├── src └── main │ ├── resources │ └── assets │ │ └── thermalexpansion │ │ └── textures │ │ ├── gui │ │ ├── cache.png │ │ ├── cell.png │ │ ├── light.png │ │ ├── plate │ │ │ ├── plate.png │ │ │ └── teleport.png │ │ ├── ender │ │ │ ├── tesseract.png │ │ │ └── tesseract_bound.png │ │ └── workbench │ │ │ ├── workbench_1.png │ │ │ ├── workbench_2.png │ │ │ ├── workbench_3.png │ │ │ └── workbench_4.png │ │ ├── items │ │ ├── material │ │ │ ├── lock.png │ │ │ ├── slag.png │ │ │ ├── dust_wood.png │ │ │ ├── pulp_wood.png │ │ │ ├── slag_rich.png │ │ │ ├── fertilizer.png │ │ │ ├── fertilizer_rich.png │ │ │ ├── pneumatic_servo.png │ │ │ ├── power_coil_gold.png │ │ │ ├── power_coil_electrum.png │ │ │ ├── power_coil_silver.png │ │ │ └── dust_wood_compressed.png │ │ ├── diagram │ │ │ ├── redprint.png │ │ │ └── schematic.png │ │ ├── icons │ │ │ ├── icon_blocked.png │ │ │ ├── icon_recvonly.png │ │ │ ├── icon_sendonly.png │ │ │ ├── icon_sendrecv.png │ │ │ ├── icon_slotschematic.png │ │ │ └── icon_config_tesseract.png │ │ ├── satchel │ │ │ ├── latch_public.png │ │ │ ├── latch_friends.png │ │ │ ├── latch_private.png │ │ │ ├── satchel_basic.png │ │ │ ├── satchel_creative.png │ │ │ ├── satchel_hardened.png │ │ │ ├── satchel_resonant.png │ │ │ └── satchel_reinforced.png │ │ └── triggers │ │ │ ├── trigger_energy_full.png │ │ │ ├── trigger_energy_empty.png │ │ │ ├── trigger_energy_space.png │ │ │ ├── trigger_energy_contains.png │ │ │ ├── trigger_tesseract_noinputs.png │ │ │ ├── trigger_tesseract_hasinputs.png │ │ │ ├── trigger_tesseract_hasoutputs.png │ │ │ └── trigger_tesseract_nooutputs.png │ │ └── blocks │ │ ├── glass │ │ ├── hardened.png │ │ └── hardened_lumium.png │ │ ├── cell │ │ ├── cell_basic.png │ │ ├── cell_meter_0.png │ │ ├── cell_meter_1.png │ │ ├── cell_meter_2.png │ │ ├── cell_meter_3.png │ │ ├── cell_meter_4.png │ │ ├── cell_meter_5.png │ │ ├── cell_meter_6.png │ │ ├── cell_meter_7.png │ │ ├── cell_meter_8.png │ │ ├── cell_creative.png │ │ ├── cell_hardened.png │ │ ├── cell_resonant.png │ │ ├── cell_basic_inner.png │ │ ├── cell_center_solid.png │ │ ├── cell_config_blue.png │ │ ├── cell_reinforced.png │ │ ├── cell_config_blue_cb.png │ │ ├── cell_config_orange.png │ │ ├── cell_creative_inner.png │ │ ├── cell_hardened_inner.png │ │ ├── cell_meter_creative.png │ │ ├── cell_resonant_inner.png │ │ ├── cell_config_orange_cb.png │ │ └── cell_reinforced_inner.png │ │ ├── light │ │ ├── lamp_effect.png │ │ ├── lamp_halo.png │ │ ├── illuminator_effect.png │ │ ├── illuminator_frame.png │ │ └── illuminator_effect.png.mcmeta │ │ ├── cache │ │ ├── cache_meter_0.png │ │ ├── cache_meter_1.png │ │ ├── cache_meter_2.png │ │ ├── cache_meter_3.png │ │ ├── cache_meter_4.png │ │ ├── cache_meter_5.png │ │ ├── cache_meter_6.png │ │ ├── cache_meter_7.png │ │ ├── cache_meter_8.png │ │ ├── cache_basic_face.png │ │ ├── cache_basic_side.png │ │ ├── cache_basic_top.png │ │ ├── cache_basic_bottom.png │ │ ├── cache_creative_top.png │ │ ├── cache_hardened_top.png │ │ ├── cache_resonant_top.png │ │ ├── cache_creative_bottom.png │ │ ├── cache_creative_face.png │ │ ├── cache_creative_side.png │ │ ├── cache_hardened_bottom.png │ │ ├── cache_hardened_face.png │ │ ├── cache_hardened_side.png │ │ ├── cache_reinforced_face.png │ │ ├── cache_reinforced_side.png │ │ ├── cache_reinforced_top.png │ │ ├── cache_resonant_bottom.png │ │ ├── cache_resonant_face.png │ │ ├── cache_resonant_side.png │ │ └── cache_reinforced_bottom.png │ │ ├── plate │ │ ├── plate_bottom.png │ │ ├── plate_top_up.png │ │ ├── plate_top_circle.png │ │ ├── plate_top_down.png │ │ ├── plate_top_east.png │ │ ├── plate_top_north.png │ │ ├── plate_top_south.png │ │ └── plate_top_west.png │ │ ├── sponge │ │ ├── sponge_basic.png │ │ ├── sponge_creative.png │ │ ├── sponge_magmatic.png │ │ ├── sponge_basic_soaked.png │ │ └── sponge_magmatic_soaked.png │ │ ├── tesseract │ │ ├── sky_ender.png │ │ ├── tesseract.png │ │ ├── tesseract_active.png │ │ ├── tesseract_inner.png │ │ ├── tesseract_inner_active.png │ │ ├── sky_ender.png.mcmeta │ │ ├── tesseract_active.png.mcmeta │ │ └── tesseract_inner_active.png.mcmeta │ │ ├── tank │ │ ├── tank_basic_top_blue.png │ │ ├── tank_basic_bottom_blue.png │ │ ├── tank_basic_side_blue.png │ │ ├── tank_basic_side_orange.png │ │ ├── tank_basic_top_orange.png │ │ ├── tank_creative_top_blue.png │ │ ├── tank_hardened_top_blue.png │ │ ├── tank_resonant_top_blue.png │ │ ├── tank_basic_bottom_orange.png │ │ ├── tank_creative_side_blue.png │ │ ├── tank_creative_top_orange.png │ │ ├── tank_hardened_side_blue.png │ │ ├── tank_hardened_top_orange.png │ │ ├── tank_reinforced_top_blue.png │ │ ├── tank_resonant_side_blue.png │ │ ├── tank_resonant_top_orange.png │ │ ├── tank_creative_bottom_blue.png │ │ ├── tank_creative_bottom_orange.png │ │ ├── tank_creative_side_orange.png │ │ ├── tank_hardened_bottom_blue.png │ │ ├── tank_hardened_bottom_orange.png │ │ ├── tank_hardened_side_orange.png │ │ ├── tank_reinforced_bottom_blue.png │ │ ├── tank_reinforced_side_blue.png │ │ ├── tank_reinforced_side_orange.png │ │ ├── tank_reinforced_top_orange.png │ │ ├── tank_resonant_bottom_blue.png │ │ ├── tank_resonant_bottom_orange.png │ │ ├── tank_resonant_side_orange.png │ │ └── tank_reinforced_bottom_orange.png │ │ ├── strongbox │ │ ├── strongbox_basic.png │ │ ├── strongbox_creative.png │ │ ├── strongbox_hardened.png │ │ ├── strongbox_resonant.png │ │ └── strongbox_reinforced.png │ │ └── workbench │ │ ├── workbench_basic_top.png │ │ ├── workbench_basic_bottom.png │ │ ├── workbench_basic_side.png │ │ ├── workbench_creative_top.png │ │ ├── workbench_hardened_top.png │ │ ├── workbench_resonant_top.png │ │ ├── workbench_creative_side.png │ │ ├── workbench_hardened_side.png │ │ ├── workbench_reinforced_top.png │ │ ├── workbench_resonant_side.png │ │ ├── workbench_creative_bottom.png │ │ ├── workbench_hardened_bottom.png │ │ ├── workbench_reinforced_bottom.png │ │ ├── workbench_reinforced_side.png │ │ └── workbench_resonant_bottom.png │ └── java │ └── cofh │ ├── thermalexpansion │ ├── block │ │ ├── simple │ │ │ ├── BlockAirBarrier.java │ │ │ ├── BlockAirLight.java │ │ │ ├── BlockAirBase.java │ │ │ └── BlockAirSignal.java │ │ ├── device │ │ │ ├── TileDevice3Axis.java │ │ │ ├── ItemBlockDevice.java │ │ │ └── TileDeviceBase.java │ │ ├── EnumType.java │ │ ├── light │ │ │ ├── TileLightFalse.java │ │ │ └── ItemBlockLight.java │ │ ├── strongbox │ │ │ ├── TileStrongboxCreative.java │ │ │ └── ItemBlockStrongbox.java │ │ ├── sponge │ │ │ ├── TileSpongeCreative.java │ │ │ └── TileSpongeMagmatic.java │ │ ├── workbench │ │ │ └── ItemBlockWorkbench.java │ │ ├── plate │ │ │ ├── ItemBlockPlate.java │ │ │ └── TilePlatePoweredBase.java │ │ ├── cache │ │ │ └── ItemBlockCache.java │ │ ├── cell │ │ │ └── TileCellCreative.java │ │ ├── ender │ │ │ └── ItemBlockEnder.java │ │ └── tank │ │ │ └── TileTankCreative.java │ ├── gui │ │ ├── client │ │ │ ├── device │ │ │ │ ├── GuiExtender.java │ │ │ │ └── GuiFountain.java │ │ │ ├── GuiSatchel.java │ │ │ ├── GuiStrongbox.java │ │ │ ├── GuiCache.java │ │ │ └── plate │ │ │ │ └── GuiPlateCharge.java │ │ ├── slot │ │ │ └── SlotSpecificItemWorkbench.java │ │ ├── container │ │ │ └── automaton │ │ │ │ └── ContainerActivator.java │ │ └── element │ │ │ └── ListBoxElementEnderText.java │ ├── plugins │ │ ├── mfr │ │ │ └── MFRPlugin.java │ │ ├── nei │ │ │ ├── handlers │ │ │ │ ├── NEIRecipeWrapper.java │ │ │ │ └── RecipeHandlerCharger.java │ │ │ ├── NEIRecipeOverlayHandler.java │ │ │ └── NEIThermalExpansionConfig.java │ │ └── eio │ │ │ └── EIOPlugin.java │ ├── render │ │ ├── model │ │ │ └── ModelStrongbox.java │ │ ├── transformation │ │ │ └── TorchTransformation.java │ │ └── RenderCache.java │ └── util │ │ └── crafting │ │ └── RecipeStyle.java │ ├── api │ ├── fluid │ │ ├── package-info.java │ │ └── ITankContainerBucketable.java │ ├── transport │ │ ├── package-info.java │ │ ├── IEnderDestination.java │ │ ├── IEnderEnergyHandler.java │ │ ├── IEnderFluidHandler.java │ │ ├── IEnderItemHandler.java │ │ └── IEnderAttuned.java │ └── tileentity │ │ └── ISecurable.java │ ├── thermaldynamics │ ├── debughelper │ │ ├── ErrorHelper.java │ │ ├── CommandServerDebug.java │ │ ├── PacketDebug.java │ │ └── PacketMultiTileInfo.java │ └── plugins │ │ ├── nei │ │ ├── NEIThermalDynamicsConfig.java │ │ └── RecipeHandlerCover.java │ │ └── TDPlugins.java │ ├── core │ ├── item │ │ └── tool │ │ │ ├── ItemAxeMulti.java │ │ │ ├── ItemShovelMulti.java │ │ │ └── ItemPickaxeMulti.java │ ├── plugins │ │ └── nei │ │ │ ├── NEICoFHConfig.java │ │ │ └── NEIGuiHandler.java │ ├── gui │ │ ├── client │ │ │ └── GuiAugments.java │ │ └── container │ │ │ ├── ContainerFriendsList.java │ │ │ └── ContainerAugments.java │ ├── key │ │ └── KeyBindingPlayerAugments.java │ ├── network │ │ └── PacketSocial.java │ └── util │ │ └── RegistrySocial.java │ ├── thermalfoundation │ └── plugins │ │ ├── mfr │ │ ├── DrinkHandlerCoal.java │ │ ├── DrinkHandlerAerotheum.java │ │ ├── DrinkHandlerGlowstone.java │ │ ├── DrinkHandlerPyrotheum.java │ │ ├── DrinkHandlerCryotheum.java │ │ ├── DrinkHandlerPetrotheum.java │ │ ├── DrinkHandlerRedstone.java │ │ ├── DrinkHandlerEnder.java │ │ └── MFRPlugin.java │ │ ├── ee3 │ │ └── EE3Plugin.java │ │ ├── nei │ │ └── NEIThermalFoundationConfig.java │ │ └── TFPlugins.java │ └── lib │ └── transport │ ├── IEnderChannelRegistry.java │ └── ClientEnderChannelRegistry.java └── README.md /src/main/resources/assets/thermalexpansion/textures/gui/cache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/cache.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/gui/cell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/cell.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/gui/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/light.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/gui/plate/plate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/plate/plate.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/gui/ender/tesseract.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/ender/tesseract.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/gui/plate/teleport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/plate/teleport.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/lock.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/slag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/slag.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/glass/hardened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/glass/hardened.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_basic.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_0.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_1.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_2.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_3.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_4.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_5.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_6.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_7.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_8.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/light/lamp_effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/light/lamp_effect.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/light/lamp_halo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/light/lamp_halo.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/diagram/redprint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/diagram/redprint.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/diagram/schematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/diagram/schematic.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/icons/icon_blocked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/icons/icon_blocked.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/dust_wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/dust_wood.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/pulp_wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/pulp_wood.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/slag_rich.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/slag_rich.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_0.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_1.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_2.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_3.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_4.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_5.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_6.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_7.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_meter_8.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_creative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_creative.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_hardened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_hardened.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_resonant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_resonant.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_up.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/sponge/sponge_basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/sponge/sponge_basic.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/sky_ender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/sky_ender.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/tesseract.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/tesseract.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/gui/ender/tesseract_bound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/ender/tesseract_bound.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/gui/workbench/workbench_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/workbench/workbench_1.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/gui/workbench/workbench_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/workbench/workbench_2.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/gui/workbench/workbench_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/workbench/workbench_3.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/gui/workbench/workbench_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/gui/workbench/workbench_4.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/icons/icon_recvonly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/icons/icon_recvonly.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/icons/icon_sendonly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/icons/icon_sendonly.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/icons/icon_sendrecv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/icons/icon_sendrecv.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/fertilizer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/fertilizer.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/satchel/latch_public.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/satchel/latch_public.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_basic_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_basic_face.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_basic_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_basic_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_basic_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_basic_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_basic_inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_basic_inner.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_center_solid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_center_solid.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_config_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_config_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_reinforced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_reinforced.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/glass/hardened_lumium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/glass/hardened_lumium.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_circle.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_down.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_east.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_east.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_north.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_north.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_south.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_south.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_west.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/plate/plate_top_west.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/sponge/sponge_creative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/sponge/sponge_creative.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/sponge/sponge_magmatic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/sponge/sponge_magmatic.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/satchel/latch_friends.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/satchel/latch_friends.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/satchel/latch_private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/satchel/latch_private.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/satchel/satchel_basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/satchel/satchel_basic.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_basic_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_basic_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_creative_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_creative_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_hardened_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_hardened_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_resonant_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_resonant_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_config_blue_cb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_config_blue_cb.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_config_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_config_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_creative_inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_creative_inner.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_hardened_inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_hardened_inner.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_creative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_meter_creative.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_resonant_inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_resonant_inner.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/light/illuminator_effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/light/illuminator_effect.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/light/illuminator_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/light/illuminator_frame.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_top_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_top_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/icons/icon_slotschematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/icons/icon_slotschematic.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/fertilizer_rich.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/fertilizer_rich.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/pneumatic_servo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/pneumatic_servo.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/power_coil_gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/power_coil_gold.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/satchel/satchel_creative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/satchel/satchel_creative.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/satchel/satchel_hardened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/satchel/satchel_hardened.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/satchel/satchel_resonant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/satchel/satchel_resonant.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_creative_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_creative_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_creative_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_creative_face.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_creative_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_creative_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_hardened_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_hardened_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_hardened_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_hardened_face.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_hardened_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_hardened_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_reinforced_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_reinforced_face.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_reinforced_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_reinforced_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_reinforced_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_reinforced_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_resonant_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_resonant_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_resonant_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_resonant_face.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_resonant_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_resonant_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_config_orange_cb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_config_orange_cb.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_reinforced_inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cell/cell_reinforced_inner.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/sponge/sponge_basic_soaked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/sponge/sponge_basic_soaked.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/strongbox/strongbox_basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/strongbox/strongbox_basic.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_bottom_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_bottom_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_side_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_side_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_side_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_side_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_top_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_top_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_top_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_top_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_top_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_top_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_top_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_top_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/tesseract_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/tesseract_active.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/tesseract_inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/tesseract_inner.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/icons/icon_config_tesseract.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/icons/icon_config_tesseract.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/power_coil_electrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/power_coil_electrum.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/power_coil_silver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/power_coil_silver.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/satchel/satchel_reinforced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/satchel/satchel_reinforced.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_energy_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_energy_full.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_reinforced_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/cache/cache_reinforced_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/sponge/sponge_magmatic_soaked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/sponge/sponge_magmatic_soaked.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/strongbox/strongbox_creative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/strongbox/strongbox_creative.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/strongbox/strongbox_hardened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/strongbox/strongbox_hardened.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/strongbox/strongbox_resonant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/strongbox/strongbox_resonant.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_bottom_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_basic_bottom_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_side_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_side_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_top_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_top_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_side_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_side_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_top_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_top_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_top_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_top_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_side_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_side_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_top_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_top_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_basic_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_basic_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/material/dust_wood_compressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/material/dust_wood_compressed.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_energy_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_energy_empty.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_energy_space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_energy_space.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/strongbox/strongbox_reinforced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/strongbox/strongbox_reinforced.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_bottom_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_bottom_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_bottom_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_bottom_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_side_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_creative_side_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_bottom_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_bottom_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_bottom_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_bottom_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_side_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_hardened_side_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_bottom_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_bottom_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_side_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_side_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_side_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_side_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_top_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_top_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_bottom_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_bottom_blue.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_bottom_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_bottom_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_side_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_resonant_side_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/tesseract_inner_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/tesseract_inner_active.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_basic_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_basic_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_basic_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_basic_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_creative_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_creative_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_hardened_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_hardened_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_resonant_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_resonant_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_energy_contains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_energy_contains.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_bottom_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/tank/tank_reinforced_bottom_orange.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_creative_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_creative_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_hardened_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_hardened_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_reinforced_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_reinforced_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_resonant_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_resonant_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_tesseract_noinputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_tesseract_noinputs.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_creative_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_creative_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_hardened_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_hardened_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_reinforced_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_reinforced_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_reinforced_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_reinforced_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_resonant_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/blocks/workbench/workbench_resonant_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_tesseract_hasinputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_tesseract_hasinputs.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_tesseract_hasoutputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_tesseract_hasoutputs.png -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_tesseract_nooutputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheCBProject/Archive/master/src/main/resources/assets/thermalexpansion/textures/items/triggers/trigger_tesseract_nooutputs.png -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/simple/BlockAirBarrier.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.simple; 2 | 3 | public class BlockAirBarrier extends BlockAirBase { 4 | 5 | public BlockAirBarrier() { 6 | 7 | super(materialBarrier); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/cofh/api/fluid/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) 2014 Team CoFH / CoFH / Cult of the Full Hub 3 | * http://www.teamcofh.com 4 | */ 5 | @API (apiVersion = CoFHAPIProps.VERSION, owner = "CoFHAPI", provides = "CoFHAPI|fluid") 6 | package cofh.api.fluid; 7 | 8 | import cofh.api.CoFHAPIProps; 9 | import net.minecraftforge.fml.common.API; 10 | -------------------------------------------------------------------------------- /src/main/java/cofh/api/transport/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * (C) 2014 Team CoFH / CoFH / Cult of the Full Hub 3 | * http://www.teamcofh.com 4 | */ 5 | @API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHAPI", provides = "CoFHAPI|transport") 6 | package cofh.api.transport; 7 | 8 | import cofh.api.CoFHAPIProps; 9 | import net.minecraftforge.fml.common.API; 10 | 11 | -------------------------------------------------------------------------------- /src/main/java/cofh/api/transport/IEnderDestination.java: -------------------------------------------------------------------------------- 1 | package cofh.api.transport; 2 | 3 | public interface IEnderDestination extends IEnderAttuned { 4 | 5 | public boolean isNotValid(); 6 | 7 | public int x(); 8 | 9 | public int y(); 10 | 11 | public int z(); 12 | 13 | public int dimension(); 14 | 15 | public int getDestination(); 16 | 17 | public boolean setDestination(int frequency); 18 | 19 | public boolean clearDestination(); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermaldynamics/debughelper/ErrorHelper.java: -------------------------------------------------------------------------------- 1 | package cofh.thermaldynamics.debughelper; 2 | 3 | import cofh.thermaldynamics.ThermalDynamics; 4 | 5 | import java.util.HashSet; 6 | 7 | public class ErrorHelper { 8 | 9 | private static HashSet stringSet = new HashSet(); 10 | 11 | public static void reportProblemOnce(String message) { 12 | 13 | if (stringSet.add(message)) { 14 | ThermalDynamics.LOG.error(message); 15 | } 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/sky_ender.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "animation": { 3 | "frametime": 14, 4 | "frames": [ 5 | 0, 6 | 1, 7 | 2, 8 | 3, 9 | 4, 10 | 5, 11 | 6, 12 | 7, 13 | 8, 14 | 9, 15 | 10, 16 | 11, 17 | 12, 18 | 13, 19 | 14, 20 | 15, 21 | 16, 22 | 17, 23 | 18, 24 | 19, 25 | 20, 26 | 21, 27 | 22, 28 | 23, 29 | 24, 30 | 25, 31 | 26, 32 | 27, 33 | 28, 34 | 29, 35 | 30 36 | ] 37 | } 38 | } -------------------------------------------------------------------------------- /src/main/java/cofh/core/item/tool/ItemAxeMulti.java: -------------------------------------------------------------------------------- 1 | package cofh.core.item.tool; 2 | 3 | import net.minecraft.block.material.Material; 4 | import net.minecraft.item.ItemAxe; 5 | 6 | public class ItemAxeMulti extends ItemToolMulti { 7 | 8 | public ItemAxeMulti(String modName) { 9 | 10 | super(modName, 3.0F, -3.2F); 11 | addToolClass("axe"); 12 | 13 | effectiveBlocks.addAll(ItemAxe.EFFECTIVE_ON); 14 | 15 | effectiveMaterials.add(Material.WOOD); 16 | effectiveMaterials.add(Material.PLANTS); 17 | effectiveMaterials.add(Material.VINE); 18 | effectiveMaterials.add(Material.CACTUS); 19 | effectiveMaterials.add(Material.GOURD); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/cofh/core/plugins/nei/NEICoFHConfig.java: -------------------------------------------------------------------------------- 1 | package cofh.plugins.nei; 2 | 3 | import codechicken.nei.api.API; 4 | import codechicken.nei.api.IConfigureNEI; 5 | import cofh.CoFHCore; 6 | 7 | public class NEICoFHConfig implements IConfigureNEI { 8 | 9 | /* IConfigureNEI */ 10 | @Override 11 | public void loadConfig() { 12 | 13 | API.registerNEIGuiHandler(NEIGuiHandler.instance); 14 | } 15 | 16 | @Override 17 | public String getName() { 18 | 19 | return CoFHCore.modName; 20 | } 21 | 22 | @Override 23 | public String getVersion() { 24 | 25 | return CoFHCore.version; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/device/TileDevice3Axis.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.device; 2 | 3 | import net.minecraftforge.fml.relauncher.Side; 4 | 5 | public abstract class TileDevice3Axis extends TileDeviceBase { 6 | 7 | /* IReconfigurableFacing */ 8 | @Override 9 | public boolean allowYAxisFacing() { 10 | 11 | return true; 12 | } 13 | 14 | @Override 15 | public boolean setFacing(int side) { 16 | 17 | if (side < 0 || side > 5) { 18 | return false; 19 | } 20 | facing = (byte) side; 21 | sideCache[facing] = 0; 22 | sideCache[facing ^ 1] = 1; 23 | markDirty(); 24 | sendUpdatePacket(Side.CLIENT); 25 | return true; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/light/illuminator_effect.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "animation": { 3 | "frametime": 4, 4 | "frames": [ 5 | 0, 6 | 1, 7 | 2, 8 | 3, 9 | 4, 10 | 5, 11 | 6, 12 | 7, 13 | 8, 14 | 9, 15 | 10, 16 | 11, 17 | 12, 18 | 13, 19 | 14, 20 | 15, 21 | 16, 22 | 17, 23 | 18, 24 | 19, 25 | 18, 26 | 17, 27 | 16, 28 | 15, 29 | 14, 30 | 13, 31 | 12, 32 | 11, 33 | 10, 34 | 9, 35 | 8, 36 | 7, 37 | 6, 38 | 5, 39 | 4, 40 | 3, 41 | 2, 42 | 1 43 | ] 44 | } 45 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/tesseract_active.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "animation": { 3 | "frametime": 4, 4 | "frames": [ 5 | 0, 6 | 1, 7 | 2, 8 | 3, 9 | 4, 10 | 5, 11 | 6, 12 | 7, 13 | 8, 14 | 9, 15 | 10, 16 | 11, 17 | 12, 18 | 13, 19 | 14, 20 | 15, 21 | 16, 22 | 17, 23 | 18, 24 | 19, 25 | 18, 26 | 17, 27 | 16, 28 | 15, 29 | 14, 30 | 13, 31 | 12, 32 | 11, 33 | 10, 34 | 9, 35 | 8, 36 | 7, 37 | 6, 38 | 5, 39 | 4, 40 | 3, 41 | 2, 42 | 1 43 | ] 44 | } 45 | } -------------------------------------------------------------------------------- /src/main/java/cofh/core/item/tool/ItemShovelMulti.java: -------------------------------------------------------------------------------- 1 | package cofh.core.item.tool; 2 | 3 | import net.minecraft.block.material.Material; 4 | import net.minecraft.item.ItemSpade; 5 | 6 | public class ItemShovelMulti extends ItemToolMulti { 7 | 8 | public ItemShovelMulti(String modName) { 9 | 10 | super(modName, 1.0F, -3.0F); 11 | addToolClass("shovel"); 12 | 13 | effectiveBlocks.addAll(ItemSpade.EFFECTIVE_ON); 14 | 15 | effectiveMaterials.add(Material.GROUND); 16 | effectiveMaterials.add(Material.GRASS); 17 | effectiveMaterials.add(Material.SAND); 18 | effectiveMaterials.add(Material.SNOW); 19 | effectiveMaterials.add(Material.CRAFTED_SNOW); 20 | effectiveMaterials.add(Material.CLAY); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/assets/thermalexpansion/textures/blocks/tesseract/tesseract_inner_active.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "animation": { 3 | "frametime": 4, 4 | "frames": [ 5 | 0, 6 | 1, 7 | 2, 8 | 3, 9 | 4, 10 | 5, 11 | 6, 12 | 7, 13 | 8, 14 | 9, 15 | 10, 16 | 11, 17 | 12, 18 | 13, 19 | 14, 20 | 15, 21 | 16, 22 | 17, 23 | 18, 24 | 19, 25 | 18, 26 | 17, 27 | 16, 28 | 15, 29 | 14, 30 | 13, 31 | 12, 32 | 11, 33 | 10, 34 | 9, 35 | 8, 36 | 7, 37 | 6, 38 | 5, 39 | 4, 40 | 3, 41 | 2, 42 | 1 43 | ] 44 | } 45 | } -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/mfr/DrinkHandlerCoal.java: -------------------------------------------------------------------------------- 1 | //package cofh.thermalfoundation.plugins.mfr; 2 | // 3 | //import net.minecraft.entity.EntityLivingBase; 4 | //import net.minecraft.potion.Potion; 5 | //import net.minecraft.potion.PotionEffect; 6 | // 7 | //import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler; 8 | // 9 | //public class DrinkHandlerCoal implements ILiquidDrinkHandler { 10 | // 11 | // public static DrinkHandlerCoal instance = new DrinkHandlerCoal(); 12 | // 13 | // @Override 14 | // public void onDrink(EntityLivingBase player) { 15 | // 16 | // player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 60 * 20, 0)); 17 | // player.addPotionEffect(new PotionEffect(Potion.blindness.id, 10 * 20, 0)); 18 | // } 19 | // 20 | //} 21 | -------------------------------------------------------------------------------- /src/main/java/cofh/core/item/tool/ItemPickaxeMulti.java: -------------------------------------------------------------------------------- 1 | package cofh.core.item.tool; 2 | 3 | import net.minecraft.block.material.Material; 4 | import net.minecraft.item.ItemPickaxe; 5 | 6 | public class ItemPickaxeMulti extends ItemToolMulti { 7 | 8 | public ItemPickaxeMulti(String modName) { 9 | 10 | super(modName, 2.0F, -2.8F); 11 | addToolClass("pickaxe"); 12 | 13 | effectiveBlocks.addAll(ItemPickaxe.EFFECTIVE_ON); 14 | 15 | effectiveMaterials.add(Material.IRON); 16 | effectiveMaterials.add(Material.ANVIL); 17 | effectiveMaterials.add(Material.ROCK); 18 | effectiveMaterials.add(Material.ICE); 19 | effectiveMaterials.add(Material.PACKED_ICE); 20 | effectiveMaterials.add(Material.GLASS); 21 | effectiveMaterials.add(Material.REDSTONE_LIGHT); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/cofh/core/gui/client/GuiAugments.java: -------------------------------------------------------------------------------- 1 | package cofh.core.gui.client; 2 | 3 | import cofh.core.gui.GuiCore; 4 | import cofh.core.gui.container.ContainerAugments; 5 | import cofh.lib.gui.GuiProps; 6 | import net.minecraft.entity.player.InventoryPlayer; 7 | import net.minecraft.util.ResourceLocation; 8 | 9 | public class GuiAugments extends GuiCore { 10 | 11 | public static final ResourceLocation TEXTURE = new ResourceLocation(GuiProps.PATH_GUI + "augments.png"); 12 | 13 | public GuiAugments(InventoryPlayer inventory) { 14 | 15 | super(new ContainerAugments(inventory), TEXTURE); 16 | 17 | // generateInfo("tab.thermalexpansion.device.lexicon", 3); 18 | 19 | ySize = 197; 20 | } 21 | 22 | @Override 23 | public void initGui() { 24 | 25 | super.initGui(); 26 | 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/mfr/DrinkHandlerAerotheum.java: -------------------------------------------------------------------------------- 1 | //package cofh.thermalfoundation.plugins.mfr; 2 | // 3 | //import net.minecraft.entity.EntityLivingBase; 4 | //import net.minecraft.potion.Potion; 5 | //import net.minecraft.potion.PotionEffect; 6 | // 7 | //import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler; 8 | // 9 | //public class DrinkHandlerAerotheum implements ILiquidDrinkHandler { 10 | // 11 | // public static DrinkHandlerAerotheum instance = new DrinkHandlerAerotheum(); 12 | // 13 | // @Override 14 | // public void onDrink(EntityLivingBase player) { 15 | // 16 | // player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 240 * 20, 0)); 17 | // player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 60 * 20, 0)); 18 | // } 19 | // 20 | //} 21 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/gui/client/device/GuiExtender.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.gui.client.device; 2 | 3 | import cofh.thermalexpansion.gui.container.ContainerTEBase; 4 | import cofh.thermalexpansion.init.TEProps; 5 | import net.minecraft.entity.player.InventoryPlayer; 6 | import net.minecraft.tileentity.TileEntity; 7 | import net.minecraft.util.ResourceLocation; 8 | 9 | public class GuiExtender extends GuiDeviceBase { 10 | 11 | public static final ResourceLocation TEXTURE = new ResourceLocation(TEProps.PATH_GUI_DEVICE + "extender.png"); 12 | 13 | public GuiExtender(InventoryPlayer inventory, TileEntity tile) { 14 | 15 | super(new ContainerTEBase(inventory, tile), tile, inventory.player, TEXTURE); 16 | 17 | generateInfo("tab.thermalexpansion.device.extender", 2); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/cofh/core/gui/container/ContainerFriendsList.java: -------------------------------------------------------------------------------- 1 | package cofh.core.gui.container; 2 | 3 | import cofh.lib.gui.container.ContainerBase; 4 | import net.minecraft.entity.player.EntityPlayer; 5 | import net.minecraft.entity.player.InventoryPlayer; 6 | 7 | public class ContainerFriendsList extends ContainerBase { 8 | 9 | public ContainerFriendsList(InventoryPlayer inventory) { 10 | 11 | } 12 | 13 | @Override 14 | public boolean canInteractWith(EntityPlayer player) { 15 | 16 | return true; 17 | } 18 | 19 | @Override 20 | public boolean supportsShiftClick(int slotIndex) { 21 | 22 | return false; 23 | } 24 | 25 | @Override 26 | protected int getPlayerInventoryVerticalOffset() { 27 | 28 | return 0; 29 | } 30 | 31 | @Override 32 | protected int getSizeInventory() { 33 | 34 | return 0; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/gui/slot/SlotSpecificItemWorkbench.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.gui.slot; 2 | 3 | import cofh.lib.gui.slot.SlotSpecificItem; 4 | import cofh.thermalexpansion.block.workbench.TileWorkbench; 5 | import net.minecraft.entity.player.EntityPlayer; 6 | import net.minecraft.inventory.IInventory; 7 | import net.minecraft.item.ItemStack; 8 | 9 | public class SlotSpecificItemWorkbench extends SlotSpecificItem { 10 | 11 | TileWorkbench myTile; 12 | 13 | public SlotSpecificItemWorkbench(IInventory inventory, int slotIndex, int x, int y, ItemStack stack) { 14 | 15 | super(inventory, slotIndex, x, y, stack); 16 | myTile = (TileWorkbench) inventory; 17 | } 18 | 19 | @Override 20 | public boolean canTakeStack(EntityPlayer player) { 21 | 22 | return myTile.getCurrentSchematicSlot() == getSlotIndex(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/mfr/DrinkHandlerGlowstone.java: -------------------------------------------------------------------------------- 1 | //package cofh.thermalfoundation.plugins.mfr; 2 | // 3 | //import net.minecraft.entity.EntityLivingBase; 4 | //import net.minecraft.potion.Potion; 5 | //import net.minecraft.potion.PotionEffect; 6 | // 7 | //import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler; 8 | // 9 | //public class DrinkHandlerGlowstone implements ILiquidDrinkHandler { 10 | // 11 | // public static DrinkHandlerGlowstone instance = new DrinkHandlerGlowstone(); 12 | // 13 | // @Override 14 | // public void onDrink(EntityLivingBase player) { 15 | // 16 | // player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 2)); 17 | // player.addPotionEffect(new PotionEffect(Potion.jump.id, 60 * 20, 2)); 18 | // player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 60 * 20, 0)); 19 | // } 20 | // 21 | //} 22 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/EnumType.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block; 2 | 3 | import net.minecraft.util.IStringSerializable; 4 | 5 | import java.util.Locale; 6 | 7 | /** 8 | * Base default types. 9 | */ 10 | public enum EnumType implements IStringSerializable { 11 | CREATIVE, BASIC, HARDENED, REINFORCED, RESONANT; 12 | 13 | @Override 14 | public String getName() { 15 | 16 | return name().toLowerCase(Locale.US); 17 | } 18 | 19 | public int meta() { 20 | 21 | return ordinal(); 22 | } 23 | 24 | public static EnumType fromMeta(int meta) { 25 | 26 | try { 27 | return values()[meta]; 28 | } catch (IndexOutOfBoundsException e) { 29 | throw new RuntimeException("Someone has requested an invalid metadata for a block inside ThermalExpansion.", e); 30 | } 31 | } 32 | 33 | public static int meta(EnumType type) { 34 | 35 | return type.ordinal(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/cofh/core/plugins/nei/NEIGuiHandler.java: -------------------------------------------------------------------------------- 1 | package cofh.plugins.nei; 2 | 3 | import codechicken.nei.api.INEIGuiAdapter; 4 | import cofh.lib.gui.GuiBase; 5 | import cofh.lib.gui.element.TabBase; 6 | import cofh.lib.util.Rectangle4i; 7 | import net.minecraft.client.gui.inventory.GuiContainer; 8 | 9 | public class NEIGuiHandler extends INEIGuiAdapter { 10 | 11 | public static NEIGuiHandler instance = new NEIGuiHandler(); 12 | 13 | @Override 14 | public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) { 15 | 16 | if (gui instanceof GuiBase) { 17 | Rectangle4i rect = new Rectangle4i(x, y, w, h); 18 | for (TabBase tab : ((GuiBase) gui).tabs) { 19 | if (tab.getBounds().intersects(rect)) { 20 | return true; 21 | } 22 | } 23 | } 24 | return false; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermaldynamics/debughelper/CommandServerDebug.java: -------------------------------------------------------------------------------- 1 | package cofh.thermaldynamics.debughelper; 2 | 3 | import cofh.core.network.PacketHandler; 4 | import net.minecraft.command.CommandBase; 5 | import net.minecraft.command.ICommandSender; 6 | import net.minecraft.server.MinecraftServer; 7 | 8 | public class CommandServerDebug extends CommandBase { 9 | 10 | @Override 11 | public String getCommandName() { 12 | 13 | return "td_showdebugstats"; 14 | } 15 | 16 | @Override 17 | public String getCommandUsage(ICommandSender p_71518_1_) { 18 | 19 | return "td_showdebugstats"; 20 | } 21 | 22 | @Override 23 | public boolean checkPermission(MinecraftServer server, ICommandSender p_71519_1_) { 24 | 25 | return true; 26 | } 27 | 28 | @Override 29 | public void execute(MinecraftServer server, ICommandSender p_71515_1_, String[] p_71515_2_) { 30 | 31 | PacketHandler.sendToServer(new PacketDebug()); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/cofh/core/gui/container/ContainerAugments.java: -------------------------------------------------------------------------------- 1 | package cofh.core.gui.container; 2 | 3 | import cofh.core.gui.slot.SlotPlayerAugment; 4 | import cofh.lib.gui.container.ContainerBase; 5 | import net.minecraft.entity.player.EntityPlayer; 6 | import net.minecraft.entity.player.InventoryPlayer; 7 | 8 | public class ContainerAugments extends ContainerBase { 9 | 10 | EntityPlayer thePlayer; 11 | 12 | public ContainerAugments(InventoryPlayer inventory) { 13 | 14 | thePlayer = inventory.player; 15 | for (int i = 0; i < 5; i++) { 16 | addSlotToContainer(new SlotPlayerAugment(thePlayer, i, 40 + i * 18 + (i * 2), 26)); 17 | } 18 | bindPlayerInventory(inventory); 19 | } 20 | 21 | @Override 22 | protected int getPlayerInventoryVerticalOffset() { 23 | 24 | return 84; 25 | } 26 | 27 | @Override 28 | public boolean canInteractWith(EntityPlayer player) { 29 | 30 | return true; 31 | } 32 | 33 | @Override 34 | protected int getSizeInventory() { 35 | 36 | return 0; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/cofh/core/key/KeyBindingPlayerAugments.java: -------------------------------------------------------------------------------- 1 | package cofh.core.key; 2 | 3 | import cofh.CoFHCore; 4 | import cofh.core.gui.GuiHandler; 5 | import net.minecraft.entity.player.EntityPlayer; 6 | 7 | public class KeyBindingPlayerAugments implements IKeyBinding { 8 | 9 | public static KeyBindingPlayerAugments instance = new KeyBindingPlayerAugments(); 10 | 11 | @Override 12 | public String getUUID() { 13 | 14 | return "cofh.augments"; 15 | } 16 | 17 | @Override 18 | public int getKey() { 19 | 20 | return CoFHCore.proxy.getKeyBind(getUUID()); 21 | } 22 | 23 | @Override 24 | public boolean hasServerSide() { 25 | 26 | return true; 27 | } 28 | 29 | @Override 30 | public boolean keyPressClient() { 31 | 32 | return true; 33 | } 34 | 35 | @Override 36 | public boolean keyPressServer(EntityPlayer player) { 37 | 38 | player.openGui(CoFHCore.instance, GuiHandler.AUGMENTS_ID, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); 39 | return true; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/gui/client/device/GuiFountain.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.gui.client.device; 2 | 3 | import cofh.lib.gui.element.ElementFluidTank; 4 | import cofh.thermalexpansion.gui.container.ContainerTEBase; 5 | import cofh.thermalexpansion.init.TEProps; 6 | import net.minecraft.entity.player.InventoryPlayer; 7 | import net.minecraft.tileentity.TileEntity; 8 | import net.minecraft.util.ResourceLocation; 9 | 10 | public class GuiFountain extends GuiDeviceBase { 11 | 12 | public static final ResourceLocation TEXTURE = new ResourceLocation(TEProps.PATH_GUI_DEVICE + "fountain.png"); 13 | 14 | public GuiFountain(InventoryPlayer inventory, TileEntity tile) { 15 | 16 | super(new ContainerTEBase(inventory, tile), tile, inventory.player, TEXTURE); 17 | 18 | generateInfo("tab.thermalexpansion.device.fountain", 3); 19 | } 20 | 21 | @Override 22 | public void initGui() { 23 | 24 | super.initGui(); 25 | 26 | addElement(new ElementFluidTank(this, 152, 9, baseTile.getTank()).setAlwaysShow(true)); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/cofh/api/fluid/ITankContainerBucketable.java: -------------------------------------------------------------------------------- 1 | package cofh.api.fluid; 2 | 3 | import net.minecraft.item.ItemStack; 4 | import net.minecraftforge.fluids.IFluidHandler; 5 | 6 | /** 7 | * Extends the IFluidHandler interface to allow manual draining/filling via buckets. 8 | * 9 | * @author Emy 10 | */ 11 | public interface ITankContainerBucketable extends IFluidHandler { 12 | 13 | /** 14 | * Called to determine if the {@link IFluidHandler} should be filled by buckets. 15 | * 16 | * @param stack The {@link ItemStack} being used to fill the IFluidHandler 17 | * @return True if the IFluidHandler is allowed to be filled with stack 18 | */ 19 | public boolean allowBucketFill(ItemStack stack); 20 | 21 | /** 22 | * Called to determine if the {@link IFluidHandler} should be drained by buckets. 23 | * 24 | * @param stack The {@link ItemStack} being used to drain the IFluidHandler 25 | * @return True if the IFluidHandler is allowed to be drained with stack 26 | */ 27 | public boolean allowBucketDrain(ItemStack stack); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/gui/container/automaton/ContainerActivator.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.gui.container.automaton; 2 | 3 | import cofh.lib.gui.slot.SlotEnergy; 4 | import cofh.thermalexpansion.block.automaton.TileActivator; 5 | import cofh.thermalexpansion.gui.container.ContainerTEBase; 6 | import net.minecraft.entity.player.InventoryPlayer; 7 | import net.minecraft.inventory.Slot; 8 | import net.minecraft.tileentity.TileEntity; 9 | 10 | public class ContainerActivator extends ContainerTEBase { 11 | 12 | TileActivator myTile; 13 | 14 | public ContainerActivator(InventoryPlayer inventory, TileEntity tile) { 15 | 16 | super(inventory, tile); 17 | 18 | myTile = (TileActivator) tile; 19 | 20 | for (int i = 0; i < 3; i++) { 21 | for (int j = 0; j < 3; j++) { 22 | addSlotToContainer(new Slot(myTile, j + i * 3, 62 + j * 18, 17 + i * 18)); 23 | } 24 | } 25 | Slot slot = new SlotEnergy(myTile, myTile.getChargeSlot(), 8, 53); 26 | if (myTile.getEnergyStorage().getMaxEnergyStored() > 0 || slot.getStack() != null) { 27 | addSlotToContainer(slot); 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/gui/element/ListBoxElementEnderText.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.gui.element; 2 | 3 | import cofh.lib.gui.element.ElementListBox; 4 | import cofh.lib.gui.element.listbox.ListBoxElementText; 5 | import cofh.lib.transport.IEnderChannelRegistry.Frequency; 6 | import cofh.thermalfoundation.fluid.TFFluids; 7 | 8 | import net.minecraftforge.fluids.FluidStack; 9 | 10 | public class ListBoxElementEnderText extends ListBoxElementText { 11 | 12 | private final Frequency freq; 13 | 14 | public ListBoxElementEnderText(Frequency freq) { 15 | 16 | super(freq.name); 17 | this.freq = freq; 18 | } 19 | 20 | @Override 21 | public Object getValue() { 22 | 23 | return freq; 24 | } 25 | 26 | @Override 27 | public void draw(ElementListBox listBox, int x, int y, int backColor, int textColor) { 28 | 29 | if (backColor == 1) { 30 | listBox.getContainerScreen().drawFluid(x, y, new FluidStack(TFFluids.fluidEnder, 1000), Math.max(getWidth(), listBox.getContentWidth()), 31 | getHeight()); 32 | } 33 | super.draw(listBox, x, y, backColor, textColor); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermaldynamics/debughelper/PacketDebug.java: -------------------------------------------------------------------------------- 1 | package cofh.thermaldynamics.debughelper; 2 | 3 | import cofh.core.network.PacketCoFHBase; 4 | import cofh.core.network.PacketHandler; 5 | import net.minecraft.entity.player.EntityPlayer; 6 | 7 | public class PacketDebug extends PacketCoFHBase { 8 | 9 | public static void initialize() { 10 | 11 | PacketHandler.instance.registerPacket(PacketDebug.class); 12 | } 13 | 14 | public PacketDebug() { 15 | 16 | } 17 | 18 | public PacketDebug(int[] displayValue) { 19 | 20 | for (int i = 0; i < displayValue.length; i++) { 21 | addInt(displayValue[i]); 22 | } 23 | } 24 | 25 | @Override 26 | public void handleClientSide(EntityPlayer player) { 27 | 28 | int[] d = new int[DebugTickHandler.DebugEvent.n]; 29 | for (int i = 0; i < DebugTickHandler.DebugEvent.n; i++) { 30 | d[i] = getInt(); 31 | } 32 | } 33 | 34 | @Override 35 | public void handlePacket(EntityPlayer player, boolean isServer) { 36 | 37 | if (isServer) { 38 | if (!DebugTickHandler.debugPlayers.remove(player)) { 39 | DebugTickHandler.debugPlayers.add(player); 40 | } 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/light/TileLightFalse.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.light; 2 | 3 | import codechicken.lib.util.BlockUtils; 4 | import net.minecraft.block.state.IBlockState; 5 | import net.minecraftforge.fml.common.registry.GameRegistry; 6 | 7 | import net.minecraft.nbt.NBTTagCompound; 8 | 9 | public class TileLightFalse extends TileLight { 10 | 11 | public static void initialize() { 12 | 13 | GameRegistry.registerTileEntity(TileLightFalse.class, "thermalexpansion.LightFalse"); 14 | } 15 | 16 | @Override 17 | public int getLightValue() { 18 | 19 | return 0; 20 | } 21 | 22 | public void cofh_validate() { 23 | 24 | IBlockState state = worldObj.getBlockState(getPos()); 25 | int meta = state.getBlock().getMetaFromState(state); 26 | worldObj.setBlockState(getPos(), state.getBlock().getStateFromMeta(meta & 3), 2); 27 | dim = true; 28 | NBTTagCompound tag = new NBTTagCompound(); 29 | writeToNBT(tag); 30 | invalidate(); 31 | TileLight tile = (TileLight) worldObj.getTileEntity(getPos()); 32 | tile.readFromNBT(tag); 33 | updateLighting(); 34 | BlockUtils.fireBlockUpdate(worldObj, getPos()); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/mfr/DrinkHandlerPyrotheum.java: -------------------------------------------------------------------------------- 1 | //package cofh.thermalfoundation.plugins.mfr; 2 | // 3 | //import cofh.lib.util.helpers.DamageHelper; 4 | // 5 | //import net.minecraft.entity.EntityLivingBase; 6 | //import net.minecraft.nbt.NBTTagCompound; 7 | //import net.minecraft.util.DamageSource; 8 | // 9 | //import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler; 10 | // 11 | //public class DrinkHandlerPyrotheum implements ILiquidDrinkHandler { 12 | // 13 | // public static DrinkHandlerPyrotheum instance = new DrinkHandlerPyrotheum(); 14 | // 15 | // @Override 16 | // public void onDrink(EntityLivingBase player) { 17 | // 18 | // player.attackEntityFrom(new InternalPyrotheumDamage(), 15); 19 | // player.setFire(60); 20 | // NBTTagCompound tag = player.getEntityData(); 21 | // tag.setLong("drankLavaTime", player.worldObj.getTotalWorldTime()); 22 | // } 23 | // 24 | // protected class InternalPyrotheumDamage extends DamageSource { 25 | // 26 | // public InternalPyrotheumDamage() { 27 | // 28 | // super(DamageHelper.pyrotheum.damageType); 29 | // this.setDamageBypassesArmor(); 30 | // this.setFireDamage(); 31 | // this.setDifficultyScaled(); 32 | // } 33 | // } 34 | // 35 | //} 36 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/strongbox/TileStrongboxCreative.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.strongbox; 2 | 3 | import cofh.lib.util.helpers.ItemHelper; 4 | import net.minecraft.item.ItemStack; 5 | import net.minecraftforge.fml.common.registry.GameRegistry; 6 | 7 | public class TileStrongboxCreative extends TileStrongbox { 8 | 9 | public static void initialize() { 10 | 11 | GameRegistry.registerTileEntity(TileStrongboxCreative.class, "thermalexpansion.StrongboxCreative"); 12 | } 13 | 14 | public TileStrongboxCreative() { 15 | 16 | } 17 | 18 | public TileStrongboxCreative(int metadata) { 19 | 20 | super(metadata); 21 | } 22 | 23 | /* IInventory */ 24 | @Override 25 | public ItemStack decrStackSize(int slot, int amount) { 26 | 27 | return ItemHelper.cloneStack(inventory[slot], amount); 28 | } 29 | 30 | @Override 31 | public ItemStack getStackInSlot(int slot) { 32 | 33 | return ItemHelper.cloneStack(inventory[slot]); 34 | } 35 | 36 | @Override 37 | public void setInventorySlotContents(int slot, ItemStack stack) { 38 | 39 | if (stack == null) { 40 | return; 41 | } 42 | inventory[slot] = stack; 43 | inventory[slot].stackSize = stack.getMaxStackSize(); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/mfr/DrinkHandlerCryotheum.java: -------------------------------------------------------------------------------- 1 | //package cofh.thermalfoundation.plugins.mfr; 2 | // 3 | //import cofh.lib.util.helpers.DamageHelper; 4 | // 5 | //import net.minecraft.entity.EntityLivingBase; 6 | //import net.minecraft.potion.Potion; 7 | //import net.minecraft.potion.PotionEffect; 8 | //import net.minecraft.util.DamageSource; 9 | // 10 | //import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler; 11 | // 12 | //public class DrinkHandlerCryotheum implements ILiquidDrinkHandler { 13 | // 14 | // public static DrinkHandlerCryotheum instance = new DrinkHandlerCryotheum(); 15 | // 16 | // @Override 17 | // public void onDrink(EntityLivingBase player) { 18 | // 19 | // player.attackEntityFrom(new InternalCryotheumDamage(), 15); 20 | // player.extinguish(); 21 | // player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 480 * 20, 0)); 22 | // } 23 | // 24 | // protected class InternalCryotheumDamage extends DamageSource { 25 | // 26 | // public InternalCryotheumDamage() { 27 | // 28 | // super(DamageHelper.cryotheum.damageType); 29 | // this.setDamageBypassesArmor(); 30 | // this.setMagicDamage(); 31 | // this.setDifficultyScaled(); 32 | // } 33 | // } 34 | // 35 | //} 36 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/mfr/DrinkHandlerPetrotheum.java: -------------------------------------------------------------------------------- 1 | //package cofh.thermalfoundation.plugins.mfr; 2 | // 3 | //import cofh.lib.util.helpers.DamageHelper; 4 | // 5 | //import net.minecraft.entity.EntityLivingBase; 6 | //import net.minecraft.potion.Potion; 7 | //import net.minecraft.potion.PotionEffect; 8 | //import net.minecraft.util.DamageSource; 9 | // 10 | //import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler; 11 | // 12 | //public class DrinkHandlerPetrotheum implements ILiquidDrinkHandler { 13 | // 14 | // public static DrinkHandlerPetrotheum instance = new DrinkHandlerPetrotheum(); 15 | // 16 | // @Override 17 | // public void onDrink(EntityLivingBase player) { 18 | // 19 | // player.attackEntityFrom(new InternalPetrotheumDamage(), 10); 20 | // player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 300 * 20, 3)); 21 | // player.addPotionEffect(new PotionEffect(Potion.resistance.id, 300 * 20, 2)); 22 | // } 23 | // 24 | // protected class InternalPetrotheumDamage extends DamageSource { 25 | // 26 | // public InternalPetrotheumDamage() { 27 | // 28 | // super(DamageHelper.petrotheum.damageType); 29 | // this.setDamageBypassesArmor(); 30 | // this.setDifficultyScaled(); 31 | // } 32 | // } 33 | // 34 | //} 35 | -------------------------------------------------------------------------------- /src/main/java/cofh/api/transport/IEnderEnergyHandler.java: -------------------------------------------------------------------------------- 1 | package cofh.api.transport; 2 | 3 | /** 4 | * This interface is implemented on Ender Attuned objects which can receive Energy (Redstone Flux). 5 | * 6 | * @author King Lemming 7 | */ 8 | public interface IEnderEnergyHandler extends IEnderAttuned { 9 | 10 | /** 11 | * Return whether or not the Ender Attuned object can currently send energy (Redstone Flux). 12 | */ 13 | boolean canSendEnergy(); 14 | 15 | /** 16 | * This should be checked to see if the Ender Attuned object can currently receive energy (Redstone Flux). 17 | *

18 | * Note: In practice, this can (and should) be used to ensure that something does not send to itself. 19 | */ 20 | boolean canReceiveEnergy(); 21 | 22 | /** 23 | * This tells the Ender Attuned object to receive energy. This returns the amount remaining, *not* the amount received - a return of 0 means that all energy 24 | * was received! 25 | * 26 | * @param energy Amount of energy to be received. 27 | * @param simulate If TRUE, the result will only be simulated. 28 | * @return Amount of energy that is remaining (or would be remaining, if simulated). 29 | */ 30 | int receiveEnergy(int energy, boolean simulate); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/cofh/api/transport/IEnderFluidHandler.java: -------------------------------------------------------------------------------- 1 | package cofh.api.transport; 2 | 3 | import net.minecraftforge.fluids.FluidStack; 4 | 5 | /** 6 | * This interface is implemented on Ender Attuned objects which can receive Fluid. 7 | * 8 | * @author King Lemming 9 | */ 10 | public interface IEnderFluidHandler extends IEnderAttuned { 11 | 12 | /** 13 | * Return whether or not the Ender Attuned object can currently send FluidStacks. 14 | */ 15 | boolean canSendFluid(); 16 | 17 | /** 18 | * This should be checked to see if the Ender Attuned object can currently receive a FluidStack. 19 | *

20 | * Note: In practice, this can (and should) be used to ensure that something does not send to itself. 21 | */ 22 | boolean canReceiveFluid(); 23 | 24 | /** 25 | * This tells the Ender Attuned object to receive a FluidStack. This returns what remains of the original stack, *not* the amount received - a null return 26 | * means that the entire stack was received! 27 | * 28 | * @param fluid FluidStack to be received. 29 | * @param simulate If TRUE, the result will only be simulated. 30 | * @return FluidStack representing how much fluid is remaining (or would be remaining, if simulated). 31 | */ 32 | FluidStack receiveFluid(FluidStack fluid, boolean simulate); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/cofh/api/transport/IEnderItemHandler.java: -------------------------------------------------------------------------------- 1 | package cofh.api.transport; 2 | 3 | import net.minecraft.item.ItemStack; 4 | 5 | /** 6 | * This interface is implemented on Ender Attuned objects which can receive Items. 7 | * 8 | * @author King Lemming 9 | */ 10 | public interface IEnderItemHandler extends IEnderAttuned { 11 | 12 | /** 13 | * Return whether or not the Ender Attuned object can currently send ItemStacks. 14 | */ 15 | boolean canSendItems(); 16 | 17 | /** 18 | * This should be checked to see if the Ender Attuned object can currently receive an ItemStack. 19 | *

20 | * Note: In practice, this can (and should) be used to ensure that something does not send to itself. 21 | */ 22 | boolean canReceiveItems(); 23 | 24 | /** 25 | * This tells the Ender Attuned object to receive an ItemStack. This returns what remains of the original stack, *not* the amount received - a null return 26 | * means that the entire stack was received! 27 | *

28 | * This function does not support simulation because Inventory manipulation in Minecraft is an absolute mess and it would be a computational liability to do 29 | * so. 30 | * 31 | * @param item ItemStack to be received. 32 | * @return An ItemStack representing how much is remaining. 33 | */ 34 | ItemStack receiveItem(ItemStack item); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermaldynamics/plugins/nei/NEIThermalDynamicsConfig.java: -------------------------------------------------------------------------------- 1 | package cofh.thermaldynamics.plugins.nei; 2 | 3 | import codechicken.nei.ItemStackMap; 4 | import codechicken.nei.api.API; 5 | import codechicken.nei.api.IConfigureNEI; 6 | import cofh.thermaldynamics.ThermalDynamics; 7 | import cofh.thermaldynamics.duct.Duct; 8 | import cofh.thermaldynamics.duct.DuctItem; 9 | import cofh.thermaldynamics.duct.TDDucts; 10 | import cofh.thermaldynamics.item.ItemCover; 11 | 12 | public class NEIThermalDynamicsConfig implements IConfigureNEI { 13 | 14 | @Override 15 | public void loadConfig() { 16 | 17 | API.registerRecipeHandler(RecipeHandlerCover.instance); 18 | API.registerUsageHandler(RecipeHandlerCover.instance); 19 | 20 | if (!ItemCover.showInNEI) { 21 | API.hideItem(ItemStackMap.wildcard(ThermalDynamics.itemCover)); 22 | } 23 | /* ItemDuct Variants */ 24 | for (Duct d : TDDucts.getSortedDucts()) { 25 | if (d instanceof DuctItem) { 26 | API.addItemListEntry(((DuctItem) d).itemStack); 27 | API.addItemListEntry(((DuctItem) d).getDenseItemStack()); 28 | API.addItemListEntry(((DuctItem) d).getVacuumItemStack()); 29 | } 30 | } 31 | } 32 | 33 | @Override 34 | public String getName() { 35 | 36 | return ThermalDynamics.modName; 37 | } 38 | 39 | @Override 40 | public String getVersion() { 41 | 42 | return ThermalDynamics.version; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/cofh/lib/transport/IEnderChannelRegistry.java: -------------------------------------------------------------------------------- 1 | package cofh.lib.transport; 2 | 3 | import com.google.common.primitives.Ints; 4 | 5 | import java.util.List; 6 | 7 | public interface IEnderChannelRegistry { 8 | 9 | public List getFrequencyList(String channel); 10 | 11 | public String getFrequency(String channel, int freq); 12 | 13 | public String setFrequency(String channel, int freq, String name); 14 | 15 | public String removeFrequency(String channel, int freq); 16 | 17 | public int updated(); 18 | 19 | public static class Frequency implements Comparable { 20 | 21 | public final int freq; 22 | public final String name; 23 | 24 | public Frequency(int freq, String name) { 25 | 26 | this.freq = freq; 27 | this.name = name; 28 | } 29 | 30 | @Override 31 | public int compareTo(Frequency o) { 32 | 33 | if (o == null) { 34 | return 1; 35 | } 36 | return Ints.compare(freq, o.freq); 37 | } 38 | 39 | @Override 40 | public boolean equals(Object o) { 41 | 42 | if (o instanceof Frequency) { 43 | return ((Frequency) o).freq == freq; 44 | } 45 | return false; 46 | } 47 | 48 | @Override 49 | public int hashCode() { 50 | 51 | return freq; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/simple/BlockAirLight.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.simple; 2 | 3 | import net.minecraft.block.state.IBlockState; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.particle.ParticleFirework; 6 | import net.minecraft.util.math.BlockPos; 7 | import net.minecraft.world.IBlockAccess; 8 | import net.minecraft.world.World; 9 | import net.minecraftforge.fml.relauncher.Side; 10 | import net.minecraftforge.fml.relauncher.SideOnly; 11 | 12 | import java.util.Random; 13 | 14 | public class BlockAirLight extends BlockAirBase { 15 | 16 | public BlockAirLight() { 17 | 18 | super(materialBarrier); 19 | } 20 | 21 | @Override 22 | public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos) { 23 | 24 | return getMetaFromState(state); 25 | } 26 | 27 | @SideOnly (Side.CLIENT) 28 | @Override 29 | public void randomDisplayTick(IBlockState stateIn, World world, BlockPos pos, Random rand) { 30 | 31 | ParticleFirework.Spark spark = new ParticleFirework.Spark(world, pos.getX() + 0.5 + rand.nextGaussian() * 0.6, pos.getY() + 0.5 + rand.nextGaussian() * 0.55, pos.getZ() + 0.5 + rand.nextGaussian() * 0.55, 0, 0, 0, Minecraft.getMinecraft().effectRenderer) { 32 | 33 | @Override 34 | public void moveEntity(double x, double y, double z) { 35 | 36 | } 37 | }; 38 | spark.setColor(0xFFFF66); 39 | spark.setColorFade(0xFFFFAA); 40 | Minecraft.getMinecraft().effectRenderer.addEffect(spark); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/cofh/core/network/PacketSocial.java: -------------------------------------------------------------------------------- 1 | package cofh.core.network; 2 | 3 | import cofh.CoFHCore; 4 | import cofh.core.util.RegistrySocial; 5 | import net.minecraft.entity.player.EntityPlayer; 6 | import net.minecraft.entity.player.EntityPlayerMP; 7 | 8 | import java.util.LinkedList; 9 | 10 | public class PacketSocial extends PacketCoFHBase { 11 | 12 | public static void initialize() { 13 | 14 | PacketHandler.instance.registerPacket(PacketSocial.class); 15 | } 16 | 17 | public enum PacketTypes { 18 | FRIEND_LIST, ADD_FRIEND, REMOVE_FRIEND 19 | } 20 | 21 | @Override 22 | public void handlePacket(EntityPlayer player, boolean isServer) { 23 | 24 | switch (PacketTypes.values()[getByte()]) { 25 | case FRIEND_LIST: 26 | int size = getInt(); 27 | RegistrySocial.clientPlayerFriends = new LinkedList<>(); 28 | for (int i = 0; i < size; i++) { 29 | RegistrySocial.clientPlayerFriends.add(getString()); 30 | } 31 | java.util.Collections.sort(RegistrySocial.clientPlayerFriends); 32 | CoFHCore.proxy.updateFriendListGui(); 33 | return; 34 | case ADD_FRIEND: 35 | RegistrySocial.addFriend(((EntityPlayerMP) player).getGameProfile(), getString()); 36 | RegistrySocial.sendFriendsToPlayer((EntityPlayerMP) player); 37 | return; 38 | case REMOVE_FRIEND: 39 | RegistrySocial.removeFriend(((EntityPlayerMP) player).getGameProfile(), getString()); 40 | RegistrySocial.sendFriendsToPlayer((EntityPlayerMP) player); 41 | return; 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/mfr/DrinkHandlerRedstone.java: -------------------------------------------------------------------------------- 1 | //package cofh.thermalfoundation.plugins.mfr; 2 | // 3 | //import cofh.core.util.CoreUtils; 4 | // 5 | //import java.util.ArrayList; 6 | // 7 | //import net.minecraft.entity.EntityLivingBase; 8 | //import net.minecraft.potion.PotionEffect; 9 | // 10 | //import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler; 11 | // 12 | //public class DrinkHandlerRedstone implements ILiquidDrinkHandler { 13 | // 14 | // public static DrinkHandlerRedstone instance = new DrinkHandlerRedstone(); 15 | // 16 | // @Override 17 | // public void onDrink(EntityLivingBase player) { 18 | // 19 | // ArrayList effects = new ArrayList(player.getActivePotionEffects()); 20 | // for (PotionEffect effect : effects) { 21 | // amplifyEffect(player, effect); 22 | // } 23 | // player.setFire(2); 24 | // 25 | // CoreUtils.doFakeLightningBolt(player.worldObj, player.posX, player.posY, player.posZ); 26 | // CoreUtils.doFakeExplosion(player.worldObj, player.posX, player.posY, player.posZ, false); 27 | // } 28 | // 29 | // boolean amplifyEffect(EntityLivingBase player, PotionEffect effect) { 30 | // 31 | // if (effect == null || effect.getIsAmbient()) { 32 | // return false; 33 | // } 34 | // int id = effect.getPotionID(); 35 | // int amplifier = Math.min(effect.getAmplifier() + 1, 3); 36 | // int duration = Math.min(effect.getDuration() * 2, 9600); 37 | // 38 | // player.addPotionEffect(new PotionEffect(id, duration, amplifier)); 39 | // return true; 40 | // } 41 | // 42 | //} 43 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/sponge/TileSpongeCreative.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.sponge; 2 | 3 | import cofh.lib.util.helpers.ServerHelper; 4 | import cofh.thermalexpansion.init.TEBlocksOld; 5 | import net.minecraft.block.state.IBlockState; 6 | import net.minecraft.util.math.BlockPos; 7 | import net.minecraftforge.fml.common.registry.GameRegistry; 8 | 9 | public class TileSpongeCreative extends TileSponge { 10 | 11 | public static void initialize() { 12 | 13 | GameRegistry.registerTileEntity(TileSpongeCreative.class, "thermalexpansion.SpongeCreative"); 14 | } 15 | 16 | public TileSpongeCreative() { 17 | 18 | } 19 | 20 | public TileSpongeCreative(int metadata) { 21 | 22 | super(metadata); 23 | } 24 | 25 | @Override 26 | public int getType() { 27 | 28 | return BlockSponge.Types.CREATIVE.ordinal(); 29 | } 30 | 31 | @Override 32 | public void placeAir() { 33 | 34 | if (ServerHelper.isClientWorld(worldObj)) { 35 | return; 36 | } 37 | if (fullOnPlace) { 38 | return; 39 | } 40 | IBlockState query; 41 | // int queryMeta; 42 | // Fluid queryFluid; 43 | // int bucketCounter = 0; 44 | for (int x = -1; x <= 1; x++) { 45 | for (int y = -1; y <= 1; y++) { 46 | for (int z = -1; z <= 1; z++) { 47 | BlockPos offsetPos = getPos().add(x, y, z); 48 | query = worldObj.getBlockState(offsetPos); 49 | if (query.getBlock().isAir(query, worldObj, offsetPos) || query.getMaterial().isLiquid()) { 50 | worldObj.setBlockState(offsetPos, TEBlocksOld.blockAirBarrier.getDefaultState(), 3); 51 | } 52 | } 53 | } 54 | } 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/cofh/api/tileentity/ISecurable.java: -------------------------------------------------------------------------------- 1 | package cofh.api.tileentity; 2 | 3 | import com.mojang.authlib.GameProfile; 4 | import net.minecraft.entity.player.EntityPlayer; 5 | 6 | /** 7 | * Implement this interface on Tile Entities which can have access restrictions. 8 | * 9 | * @author King Lemming 10 | */ 11 | public interface ISecurable { 12 | 13 | /** 14 | * Enum for Access Modes - TeamOnly allows Team access, FriendsOnly is Friends Only, Private is Owner only. 15 | * 16 | * @author King Lemming 17 | */ 18 | enum AccessMode { 19 | PUBLIC, TEAM, FRIENDS, PRIVATE; 20 | 21 | public boolean isPublic() { 22 | 23 | return this == PUBLIC; 24 | } 25 | 26 | public boolean isTeamOnly() { 27 | 28 | return this == TEAM; 29 | } 30 | 31 | public boolean isFriendsOnly() { 32 | 33 | return this == FRIENDS; 34 | } 35 | 36 | public boolean isPrivate() { 37 | 38 | return this == PRIVATE; 39 | } 40 | 41 | public static AccessMode stepForward(AccessMode curAccess) { 42 | 43 | return curAccess == PUBLIC ? TEAM : curAccess == TEAM ? FRIENDS : curAccess == PRIVATE ? PUBLIC : PRIVATE; 44 | } 45 | 46 | public static AccessMode stepBackward(AccessMode curAccess) { 47 | 48 | return curAccess == PUBLIC ? PRIVATE : curAccess == PRIVATE ? FRIENDS : curAccess == FRIENDS ? TEAM : PUBLIC; 49 | } 50 | } 51 | 52 | boolean canPlayerAccess(EntityPlayer player); 53 | 54 | boolean setAccess(AccessMode access); 55 | 56 | boolean setOwnerName(String name); 57 | 58 | boolean setOwner(GameProfile name); 59 | 60 | AccessMode getAccess(); 61 | 62 | String getOwnerName(); 63 | 64 | GameProfile getOwner(); 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/cofh/api/transport/IEnderAttuned.java: -------------------------------------------------------------------------------- 1 | package cofh.api.transport; 2 | 3 | /** 4 | * Internal Only.
5 | * Not to be implemented directly. 6 | */ 7 | public interface IEnderAttuned { 8 | 9 | /** 10 | * Returns the channel this IEnderAttuned is operating on.
11 | * Typically, this is _public_ or the player's profile (not display) name but can be anything.
12 | * It is used to separate frequency spectrums. 13 | *

14 | * Before changing, the IEnderAttuned must be removed from all registries it has been added to. 15 | * 16 | * @return The channel this IEnderAttuned is operating on. 17 | */ 18 | public String getChannelString(); 19 | 20 | /** 21 | * Returns the frequency this IEnderAttuned is operating on.
22 | * Nominally, this value is positive and user-controlled. 23 | *

24 | * Before changing, the IEnderAttuned must be removed from all registries it has been added to. 25 | * 26 | * @return The frequency this IEnderAttuned is operating on. 27 | */ 28 | public int getFrequency(); 29 | 30 | /** 31 | * Changes the value returned by getFrequency() 32 | * 33 | * @return True if the frequency was successfully modified. 34 | */ 35 | public boolean setFrequency(int frequency); 36 | 37 | /** 38 | * Removes this IEnderAttuned from all registries.
39 | * It is recommended that this not be called from setFrequency(). 40 | * 41 | * @return True if the frequency was successfully modified. 42 | */ 43 | public boolean clearFrequency(); 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/plugins/mfr/MFRPlugin.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.plugins.mfr; 2 | 3 | import cofh.asm.relauncher.Strippable; 4 | import cofh.lib.util.helpers.MathHelper; 5 | import cofh.thermalexpansion.ThermalExpansion; 6 | import cofh.thermalexpansion.item.TEItems; 7 | 8 | import net.minecraft.item.Item; 9 | import net.minecraft.item.ItemStack; 10 | 11 | 12 | public class MFRPlugin { 13 | 14 | public static void preInit() { 15 | 16 | } 17 | 18 | public static void initialize() { 19 | 20 | } 21 | 22 | @Strippable("mod:MineFactoryReloaded") 23 | public static void postInit() { 24 | 25 | /*FactoryRegistry.sendMessage("registerFertilizer", new IFactoryFertilizer() { 26 | 27 | @Override 28 | public Item getFertilizer() { 29 | 30 | return TEItems.itemMaterial; 31 | } 32 | 33 | @Override 34 | public FertilizerType getFertilizerType(ItemStack stack) { 35 | 36 | if (TEItems.fertilizer.isItemEqual(stack)) { 37 | return FertilizerType.GrowPlant; 38 | } else if (TEItems.fertilizerRich.isItemEqual(stack)) { 39 | return FertilizerType.GrowPlant; 40 | } 41 | return FertilizerType.None; 42 | } 43 | 44 | @Override 45 | public void consume(ItemStack fertilizer) { 46 | 47 | if (TEItems.fertilizerRich.isItemEqual(fertilizer)) { 48 | if (MathHelper.RANDOM.nextBoolean()) { 49 | fertilizer.stackSize += 1; 50 | } 51 | } else { 52 | fertilizer.stackSize -= 1; 53 | } 54 | fertilizer.stackSize -= 1; 55 | } 56 | 57 | });*/ 58 | } 59 | 60 | @Strippable("mod:MineFactoryReloaded") 61 | public static void loadComplete() { 62 | 63 | ThermalExpansion.log.info("Thermal Expansion: MineFactoryReloaded Plugin Enabled."); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/mfr/DrinkHandlerEnder.java: -------------------------------------------------------------------------------- 1 | //package cofh.thermalfoundation.plugins.mfr; 2 | // 3 | //import cofh.core.util.CoreUtils; 4 | //import cofh.lib.util.helpers.ServerHelper; 5 | // 6 | //import net.minecraft.entity.EntityLivingBase; 7 | //import net.minecraft.init.Items; 8 | //import net.minecraft.item.ItemStack; 9 | //import net.minecraft.potion.Potion; 10 | //import net.minecraft.potion.PotionEffect; 11 | // 12 | //import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler; 13 | // 14 | //public class DrinkHandlerEnder implements ILiquidDrinkHandler { 15 | // 16 | // public static DrinkHandlerEnder instance = new DrinkHandlerEnder(); 17 | // 18 | // @Override 19 | // public void onDrink(EntityLivingBase player) { 20 | // 21 | // if (ServerHelper.isClientWorld(player.worldObj)) { 22 | // return; 23 | // } 24 | // int x2 = (int) (player.posX - MFRPlugin.strawEnderRange + player.worldObj.rand.nextInt(MFRPlugin.strawEnderRange * 2)); 25 | // int y2 = (int) (player.posY + player.worldObj.rand.nextInt(8)); 26 | // int z2 = (int) (player.posZ - MFRPlugin.strawEnderRange + player.worldObj.rand.nextInt(MFRPlugin.strawEnderRange * 2)); 27 | // 28 | // if (!player.worldObj.getBlock(x2, y2, z2).getMaterial().isSolid()) { 29 | // CoreUtils.teleportEntityTo(player, x2, y2, z2); 30 | // player.playSound("portal.trigger", 1.0F, 1.0F); 31 | // player.addPotionEffect(new PotionEffect(Potion.confusion.id, 15 * 20, 0)); 32 | // player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 15 * 20, 0)); 33 | // } else { 34 | // for (int i = 0; i < 1 + player.worldObj.rand.nextInt(3); i++) { 35 | // CoreUtils.dropItemStackIntoWorld(new ItemStack(Items.ender_pearl), player.worldObj, player.posX, player.posY, player.posZ); 36 | // } 37 | // } 38 | // } 39 | // 40 | //} 41 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/device/ItemBlockDevice.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.device; 2 | 3 | import cofh.api.tileentity.IRedstoneControl.ControlMode; 4 | import cofh.core.block.ItemBlockCore; 5 | import cofh.lib.util.helpers.*; 6 | import cofh.thermalexpansion.util.ReconfigurableHelper; 7 | import net.minecraft.block.Block; 8 | import net.minecraft.entity.player.EntityPlayer; 9 | import net.minecraft.item.ItemStack; 10 | 11 | import java.util.List; 12 | 13 | public class ItemBlockDevice extends ItemBlockCore { 14 | 15 | public static ItemStack setDefaultTag(ItemStack container) { 16 | 17 | ReconfigurableHelper.setFacing(container, 3); 18 | ReconfigurableHelper.setSideCache(container, TileDeviceBase.defaultSideConfig[container.getItemDamage()].defaultSides); 19 | RedstoneControlHelper.setControl(container, ControlMode.DISABLED); 20 | EnergyHelper.setDefaultEnergyTag(container, 0); 21 | 22 | return container; 23 | } 24 | 25 | public ItemBlockDevice(Block block) { 26 | 27 | super(block); 28 | setHasSubtypes(true); 29 | setMaxDamage(0); 30 | setNoRepair(); 31 | } 32 | 33 | @Override 34 | public String getUnlocalizedName(ItemStack stack) { 35 | 36 | return "tile.thermalexpansion.device." + BlockDevice.Type.byMetadata(ItemHelper.getItemDamage(stack)).getName() + ".name"; 37 | } 38 | 39 | @Override 40 | public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean check) { 41 | 42 | SecurityHelper.addOwnerInformation(stack, list); 43 | if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) { 44 | list.add(StringHelper.shiftForDetails()); 45 | } 46 | if (!StringHelper.isShiftKeyDown()) { 47 | return; 48 | } 49 | SecurityHelper.addAccessInformation(stack, list); 50 | 51 | list.add(StringHelper.getInfoText("info.thermalexpansion.device." + BlockDevice.Type.byMetadata(ItemHelper.getItemDamage(stack)).getName())); 52 | 53 | RedstoneControlHelper.addRSControlInformation(stack, list); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/ee3/EE3Plugin.java: -------------------------------------------------------------------------------- 1 | //package cofh.thermalfoundation.plugins.ee3; 2 | // 3 | //import cofh.api.modhelpers.EE3Helper; 4 | //import cofh.asm.relauncher.Strippable; 5 | //import cofh.lib.util.helpers.ItemHelper; 6 | //import cofh.thermalfoundation.ThermalFoundation; 7 | //import cofh.thermalfoundation.fluid.TFFluids; 8 | //import cofh.thermalfoundation.item.TFItems; 9 | // 10 | //import net.minecraftforge.fluids.FluidStack; 11 | // 12 | //public class EE3Plugin { 13 | // 14 | // public static void preInit() { 15 | // 16 | // } 17 | // 18 | // @Strippable("mod:EE3") 19 | // public static void initialize() throws Throwable { 20 | // 21 | // EE3Helper.addPreAssignedEnergyValue(TFItems.ingotCopper, 128); 22 | // EE3Helper.addPreAssignedEnergyValue(TFItems.ingotTin, 192); 23 | // EE3Helper.addPreAssignedEnergyValue(TFItems.ingotNickel, 1024); 24 | // EE3Helper.addPreAssignedEnergyValue(TFItems.ingotLead, 512); 25 | // EE3Helper.addPreAssignedEnergyValue(TFItems.ingotSilver, 512); 26 | // EE3Helper.addPreAssignedEnergyValue(TFItems.ingotPlatinum, 16384); 27 | // EE3Helper.addPreAssignedEnergyValue(TFItems.ingotMithril, 16384); 28 | // 29 | // EE3Helper.addPreAssignedEnergyValue(TFItems.rodBlizz, 1536); 30 | // 31 | // EE3Helper.addRecipe(ItemHelper.cloneStack(TFItems.dustSignalum, 4), TFItems.dustCopper, TFItems.dustCopper, TFItems.dustCopper, TFItems.dustSilver, 32 | // new FluidStack(TFFluids.fluidRedstone, 1000)); 33 | // 34 | // EE3Helper.addRecipe(ItemHelper.cloneStack(TFItems.dustLumium, 4), TFItems.dustTin, TFItems.dustTin, TFItems.dustTin, TFItems.dustSilver, 35 | // new FluidStack(TFFluids.fluidGlowstone, 1000)); 36 | // 37 | // EE3Helper.addRecipe(ItemHelper.cloneStack(TFItems.dustEnderium, 4), TFItems.dustTin, TFItems.dustTin, TFItems.dustSilver, TFItems.dustPlatinum, 38 | // new FluidStack(TFFluids.fluidEnder, 1000)); 39 | // 40 | // } 41 | // 42 | // public static void postInit() { 43 | // 44 | // } 45 | // 46 | // @Strippable("mod:EE3") 47 | // public static void loadComplete() { 48 | // 49 | // ThermalFoundation.log.info("Thermal Foundation: Equivalent Exchange 3 Plugin Enabled."); 50 | // } 51 | // 52 | //} 53 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/gui/client/GuiSatchel.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.gui.client; 2 | 3 | import cofh.api.tileentity.ISecurable; 4 | import cofh.core.CoFHProps; 5 | import cofh.core.gui.GuiBaseAdv; 6 | import cofh.core.gui.element.TabInfo; 7 | import cofh.core.gui.element.TabSecurity; 8 | import cofh.lib.util.helpers.MathHelper; 9 | import cofh.lib.util.helpers.SecurityHelper; 10 | import cofh.lib.util.helpers.StringHelper; 11 | import cofh.thermalexpansion.gui.container.ContainerSatchel; 12 | import cofh.thermalexpansion.item.ItemSatchel; 13 | import net.minecraft.entity.player.InventoryPlayer; 14 | 15 | import java.util.UUID; 16 | 17 | public class GuiSatchel extends GuiBaseAdv { 18 | 19 | boolean enchanted; 20 | boolean secure; 21 | UUID playerName; 22 | int storageIndex; 23 | 24 | public GuiSatchel(InventoryPlayer inventory, ContainerSatchel container) { 25 | 26 | super(container); 27 | 28 | playerName = SecurityHelper.getID(inventory.player); 29 | storageIndex = ItemSatchel.getStorageIndex(container.getContainerStack()); 30 | enchanted = ItemSatchel.isEnchanted(container.getContainerStack()); 31 | secure = SecurityHelper.isSecure(container.getContainerStack()); 32 | 33 | texture = CoFHProps.TEXTURE_STORAGE[storageIndex]; 34 | name = container.getInventoryName(); 35 | allowUserInput = false; 36 | 37 | xSize = 14 + 18 * MathHelper.clamp(storageIndex + 1, 9, 13); 38 | ySize = 112 + 18 * MathHelper.clamp(storageIndex, 2, 8); 39 | 40 | if (storageIndex == ItemSatchel.Types.CREATIVE.ordinal()) { 41 | myInfo = StringHelper.localize("tab.thermalexpansion.satchel.creative"); 42 | } else { 43 | myInfo = StringHelper.localize("tab.thermalexpansion.satchel.0") + "\n\n" + StringHelper.localize("tab.thermalexpansion.satchel.1"); 44 | 45 | if (!enchanted) { 46 | myInfo += "\n\n" + StringHelper.localize("tab.thermalexpansion.storage.enchant"); 47 | } 48 | } 49 | } 50 | 51 | @Override 52 | public void initGui() { 53 | 54 | super.initGui(); 55 | 56 | addTab(new TabInfo(this, myInfo)); 57 | if (ItemSatchel.enableSecurity && secure) { 58 | addTab(new TabSecurity(this, (ISecurable) inventorySlots, playerName)); 59 | } 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/gui/client/GuiStrongbox.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.gui.client; 2 | 3 | import cofh.core.CoFHProps; 4 | import cofh.core.gui.GuiBaseAdv; 5 | import cofh.core.gui.element.TabInfo; 6 | import cofh.core.gui.element.TabSecurity; 7 | import cofh.lib.util.helpers.MathHelper; 8 | import cofh.lib.util.helpers.SecurityHelper; 9 | import cofh.lib.util.helpers.StringHelper; 10 | import cofh.thermalexpansion.block.EnumType; 11 | import cofh.thermalexpansion.block.strongbox.TileStrongbox; 12 | import cofh.thermalexpansion.gui.container.ContainerStrongbox; 13 | import net.minecraft.entity.player.InventoryPlayer; 14 | import net.minecraft.tileentity.TileEntity; 15 | 16 | import java.util.UUID; 17 | 18 | public class GuiStrongbox extends GuiBaseAdv { 19 | 20 | TileStrongbox myTile; 21 | UUID playerName; 22 | int storageIndex; 23 | 24 | public GuiStrongbox(InventoryPlayer inventory, TileEntity tile) { 25 | 26 | super(new ContainerStrongbox(inventory, tile)); 27 | 28 | myTile = (TileStrongbox) tile; 29 | playerName = SecurityHelper.getID(inventory.player); 30 | storageIndex = myTile.getStorageIndex(); 31 | texture = CoFHProps.TEXTURE_STORAGE[storageIndex]; 32 | name = myTile.getName(); 33 | 34 | xSize = 14 + 18 * MathHelper.clamp(storageIndex + 1, 9, 13); 35 | ySize = 112 + 18 * MathHelper.clamp(storageIndex, 2, 8); 36 | 37 | if (myTile.type == EnumType.CREATIVE.ordinal()) { 38 | myInfo = StringHelper.localize("tab.thermalexpansion.strongbox.creative"); 39 | } else { 40 | myInfo = StringHelper.localize("tab.thermalexpansion.strongbox.0"); 41 | 42 | if (myTile.enchant <= 0) { 43 | myInfo += "\n\n" + StringHelper.localize("tab.thermalexpansion.storage.enchant"); 44 | } 45 | } 46 | } 47 | 48 | @Override 49 | public void initGui() { 50 | 51 | super.initGui(); 52 | 53 | addTab(new TabInfo(this, myInfo)); 54 | if (myTile.enableSecurity() && myTile.isSecured()) { 55 | addTab(new TabSecurity(this, myTile, playerName)); 56 | } 57 | } 58 | 59 | @Override 60 | public void updateScreen() { 61 | 62 | super.updateScreen(); 63 | 64 | if (!myTile.canAccess()) { 65 | this.mc.thePlayer.closeScreen(); 66 | } 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/workbench/ItemBlockWorkbench.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.workbench; 2 | 3 | import cofh.api.item.IInventoryContainerItem; 4 | import cofh.core.block.ItemBlockCore; 5 | import cofh.lib.util.helpers.ItemHelper; 6 | import cofh.lib.util.helpers.SecurityHelper; 7 | import cofh.lib.util.helpers.StringHelper; 8 | import cofh.thermalexpansion.block.EnumType; 9 | import net.minecraft.block.Block; 10 | import net.minecraft.entity.player.EntityPlayer; 11 | import net.minecraft.item.EnumRarity; 12 | import net.minecraft.item.ItemStack; 13 | 14 | import java.util.List; 15 | 16 | public class ItemBlockWorkbench extends ItemBlockCore implements IInventoryContainerItem { 17 | 18 | public ItemBlockWorkbench(Block block) { 19 | 20 | super(block); 21 | } 22 | 23 | @Override 24 | public String getUnlocalizedName(ItemStack stack) { 25 | 26 | return "tile.thermalexpansion.workbench." + BlockWorkbench.NAMES[ItemHelper.getItemDamage(stack)] + ".name"; 27 | } 28 | 29 | @Override 30 | public EnumRarity getRarity(ItemStack stack) { 31 | 32 | switch (EnumType.values()[ItemHelper.getItemDamage(stack)]) { 33 | case CREATIVE: 34 | return EnumRarity.EPIC; 35 | case RESONANT: 36 | return EnumRarity.RARE; 37 | case REINFORCED: 38 | return EnumRarity.UNCOMMON; 39 | default: 40 | return EnumRarity.COMMON; 41 | } 42 | } 43 | 44 | @Override 45 | public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean check) { 46 | 47 | SecurityHelper.addOwnerInformation(stack, list); 48 | if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) { 49 | list.add(StringHelper.shiftForDetails()); 50 | } 51 | if (!StringHelper.isShiftKeyDown()) { 52 | return; 53 | } 54 | int meta = ItemHelper.getItemDamage(stack); 55 | SecurityHelper.addAccessInformation(stack, list); 56 | list.add(StringHelper.getInfoText("info.thermalexpansion.workbench")); 57 | ItemHelper.addInventoryInformation(stack, list, 0, TileWorkbench.INVENTORY[meta]); 58 | } 59 | 60 | /* IInventoryContainerItem */ 61 | @Override 62 | public int getSizeInventory(ItemStack container) { 63 | 64 | return TileWorkbench.INVENTORY[ItemHelper.getItemDamage(container)]; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/render/model/ModelStrongbox.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.render.model; 2 | 3 | import net.minecraft.client.model.ModelBase; 4 | import net.minecraft.client.model.ModelRenderer; 5 | 6 | public class ModelStrongbox extends ModelBase { 7 | 8 | public ModelRenderer boxLid; 9 | public ModelRenderer boxBase; 10 | public ModelRenderer publicKnob; 11 | public ModelRenderer restrictedKnob; 12 | public ModelRenderer privateKnob; 13 | 14 | public ModelStrongbox() { 15 | 16 | boxLid = new ModelRenderer(this, 0, 0).setTextureSize(64, 64); 17 | boxLid.addBox(0.0F, -5F, -14F, 14, 5, 14, 0.0F); 18 | boxLid.rotationPointX = 1.0F; 19 | boxLid.rotationPointY = 7F; 20 | boxLid.rotationPointZ = 15F; 21 | 22 | boxBase = new ModelRenderer(this, 0, 19).setTextureSize(64, 64); 23 | boxBase.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F); 24 | boxBase.rotationPointX = 1.0F; 25 | boxBase.rotationPointY = 6F; 26 | boxBase.rotationPointZ = 1.0F; 27 | 28 | publicKnob = new ModelRenderer(this, 0, 0).setTextureSize(64, 64); 29 | publicKnob.addBox(-1F, -2F, -15F, 2, 4, 1, 0.0F); 30 | publicKnob.rotationPointX = 8F; 31 | publicKnob.rotationPointY = 7F; 32 | publicKnob.rotationPointZ = 15F; 33 | 34 | restrictedKnob = new ModelRenderer(this, 6, 0).setTextureSize(64, 64); 35 | restrictedKnob.addBox(-1F, -2F, -15F, 2, 4, 1, 0.0F); 36 | restrictedKnob.rotationPointX = 8F; 37 | restrictedKnob.rotationPointY = 7F; 38 | restrictedKnob.rotationPointZ = 15F; 39 | 40 | privateKnob = new ModelRenderer(this, 0, 5).setTextureSize(64, 64); 41 | privateKnob.addBox(-1F, -2F, -15F, 2, 4, 1, 0.0F); 42 | privateKnob.rotationPointX = 8F; 43 | privateKnob.rotationPointY = 7F; 44 | privateKnob.rotationPointZ = 15F; 45 | } 46 | 47 | public void render(int access) { 48 | 49 | boxLid.render(0.0625F); 50 | boxBase.render(0.0625F); 51 | 52 | if (access == 0) { 53 | publicKnob.rotateAngleX = boxLid.rotateAngleX; 54 | publicKnob.render(0.0625F); 55 | } else if (access == 1) { 56 | restrictedKnob.rotateAngleX = boxLid.rotateAngleX; 57 | restrictedKnob.render(0.0625F); 58 | } else if (access == 2) { 59 | privateKnob.rotateAngleX = boxLid.rotateAngleX; 60 | privateKnob.render(0.0625F); 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/render/transformation/TorchTransformation.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.render.transformation; 2 | 3 | import codechicken.lib.vec.Matrix4; 4 | import codechicken.lib.vec.RedundantTransformation; 5 | import codechicken.lib.vec.Transformation; 6 | import codechicken.lib.vec.Vector3; 7 | import net.minecraftforge.fml.relauncher.Side; 8 | import net.minecraftforge.fml.relauncher.SideOnly; 9 | 10 | public class TorchTransformation extends Transformation { 11 | 12 | public static Transformation[] sideTransformations = { new RedundantTransformation(), new TorchTransformation(1), new TorchTransformation(2), new TorchTransformation(3), new TorchTransformation(4), new TorchTransformation(5), }; 13 | 14 | int alignment; 15 | 16 | public TorchTransformation(int alignment) { 17 | 18 | this.alignment = alignment; 19 | } 20 | 21 | @Override 22 | public void apply(Matrix4 mat) { 23 | 24 | } 25 | 26 | @Override 27 | public void applyN(Vector3 normal) { 28 | 29 | apply(normal); 30 | } 31 | 32 | @Override 33 | public void apply(Vector3 vec) { 34 | 35 | if (alignment > 1 && alignment < 6) { 36 | double amt = 0.25; 37 | if (vec.y <= 0.5) { 38 | amt += 0.25; 39 | } 40 | switch (alignment) { 41 | case 2: 42 | vec.z -= amt; 43 | break; 44 | case 3: 45 | vec.z += amt; 46 | break; 47 | case 4: 48 | vec.x -= amt; 49 | break; 50 | case 5: 51 | vec.x += amt; 52 | break; 53 | } 54 | vec.y += 3. / 16; 55 | } else if (alignment == 1) { 56 | vec.y = .5 - vec.y + .5; 57 | vec.z = .5 - vec.z + .5; 58 | } 59 | } 60 | 61 | @Override 62 | public Transformation merge(Transformation next) { 63 | 64 | if (next.getClass() == TorchTransformation.class) { 65 | TorchTransformation other = (TorchTransformation) next; 66 | if ((other.alignment ^ 1) == alignment) { 67 | return sideTransformations[0]; 68 | } 69 | } 70 | return isRedundant() ? next : null; 71 | } 72 | 73 | @Override 74 | public Transformation inverse() { 75 | 76 | return new TorchTransformation(alignment ^ 1); 77 | } 78 | 79 | @Override 80 | public boolean isRedundant() { 81 | 82 | return alignment <= 0 || alignment >= 6; 83 | } 84 | 85 | @Override 86 | @SideOnly (Side.CLIENT) 87 | public void glApply() { 88 | 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/util/crafting/RecipeStyle.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.util.crafting; 2 | 3 | import cofh.lib.util.helpers.ItemHelper; 4 | import cofh.thermalexpansion.block.light.ItemBlockLight; 5 | 6 | import net.minecraft.inventory.InventoryCrafting; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraft.item.crafting.ShapedRecipes; 9 | import net.minecraft.world.World; 10 | 11 | public class RecipeStyle extends ShapedRecipes { 12 | 13 | private static ItemStack[] copy(int size, ItemStack d, int style) { 14 | 15 | d = ItemBlockLight.setDefaultTag(d.copy(), style); 16 | ItemStack[] r = new ItemStack[size]; 17 | for (int i = 0; i < size; ++i) { 18 | r[i] = d; 19 | } 20 | return r; 21 | } 22 | 23 | protected ItemStack input; 24 | protected byte style; 25 | 26 | public RecipeStyle(int width, int height, ItemStack input, int style, ItemStack output) { 27 | 28 | super(width, height, copy(width * height, input, style), output.copy()); 29 | 30 | this.style = (byte) style; 31 | this.input = input; 32 | } 33 | 34 | @Override 35 | public boolean matches(InventoryCrafting inv, World world) { 36 | 37 | for (int x = 0; x <= 3 - this.recipeWidth; ++x) { 38 | for (int y = 0; y <= 3 - this.recipeHeight; ++y) { 39 | if (this.checkMatch(inv, x, y)) { 40 | return true; 41 | } 42 | } 43 | } 44 | return false; 45 | } 46 | 47 | private boolean checkMatch(InventoryCrafting inv, int x, int y) { 48 | 49 | for (int left = 0; left < 3; ++left) { 50 | for (int top = 0; top < 3; ++top) { 51 | int posX = left - x; 52 | int posY = top - y; 53 | ItemStack itemstack = null; 54 | 55 | if ((posX | posY) >= 0 && posX < this.recipeWidth && posY < this.recipeHeight) { 56 | itemstack = input; 57 | } 58 | 59 | ItemStack itemstack1 = inv.getStackInRowAndColumn(left, top); 60 | if (itemstack != itemstack1 && !ItemHelper.itemsEqualForCrafting(itemstack, itemstack1)) { 61 | return false; 62 | } else if (itemstack1 != null && itemstack1.getTagCompound() != null) { 63 | if (itemstack1.getTagCompound().getByte("Style") != style) { 64 | return false; 65 | } 66 | } 67 | } 68 | } 69 | return true; 70 | } 71 | 72 | @Override 73 | public ItemStack getCraftingResult(InventoryCrafting inv) { 74 | 75 | return this.getRecipeOutput().copy(); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/cofh/lib/transport/ClientEnderChannelRegistry.java: -------------------------------------------------------------------------------- 1 | package cofh.lib.transport; 2 | 3 | import cofh.lib.network.ByteBufHelper; 4 | import gnu.trove.map.hash.TIntObjectHashMap; 5 | import io.netty.buffer.ByteBuf; 6 | 7 | import java.util.ArrayList; 8 | import java.util.Collections; 9 | import java.util.List; 10 | 11 | public class ClientEnderChannelRegistry implements IEnderChannelRegistry { 12 | 13 | private TIntObjectHashMap channel = new TIntObjectHashMap(); 14 | private ArrayList list = new ArrayList(); 15 | private int modCount; 16 | protected String hostedChannel = ""; 17 | 18 | public ClientEnderChannelRegistry() { 19 | 20 | } 21 | 22 | public void readFrequencyData(ByteBuf data) { 23 | 24 | ++modCount; 25 | channel.clear(); 26 | list.clear(); 27 | int size = ByteBufHelper.readVarInt(data); 28 | hostedChannel = ByteBufHelper.readString(data); 29 | for (int i = 0; i < size; ++i) { 30 | int freq = ByteBufHelper.readVarInt(data); 31 | String name = ByteBufHelper.readString(data); 32 | channel.put(freq, name); 33 | list.add(new Frequency(freq, name)); 34 | } 35 | Collections.sort(list); 36 | } 37 | 38 | public String getChannelName() { 39 | 40 | return hostedChannel; 41 | } 42 | 43 | @Override 44 | public List getFrequencyList(String s) { 45 | 46 | return list; 47 | } 48 | 49 | @Override 50 | public String getFrequency(String s, int freq) { 51 | 52 | return channel.get(freq); 53 | } 54 | 55 | @Override 56 | public String setFrequency(String s, int freq, String name) { 57 | 58 | ++modCount; 59 | Frequency f = new Frequency(freq, name); 60 | int i = list.indexOf(f); 61 | if (i < 0) { 62 | list.add(f); 63 | Collections.sort(list); 64 | } else { 65 | list.set(i, f); 66 | } 67 | return channel.put(freq, name); 68 | } 69 | 70 | @Override 71 | public String removeFrequency(String s, int freq) { 72 | 73 | ++modCount; 74 | list.remove(new Frequency(freq, "")); 75 | return channel.remove(freq); 76 | } 77 | 78 | @Override 79 | public int updated() { 80 | 81 | return modCount; 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/device/TileDeviceBase.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.device; 2 | 3 | import cofh.thermalexpansion.ThermalExpansion; 4 | import cofh.thermalexpansion.block.TilePowered; 5 | import cofh.thermalexpansion.init.TETextures; 6 | import net.minecraft.client.renderer.texture.TextureAtlasSprite; 7 | import net.minecraftforge.fml.relauncher.Side; 8 | 9 | public abstract class TileDeviceBase extends TilePowered { 10 | 11 | protected static final SideConfig[] defaultSideConfig = new SideConfig[BlockDevice.Type.values().length]; 12 | private static boolean enableSecurity = true; 13 | 14 | public static void config() { 15 | 16 | String comment = "Enable this to allow for Devices to be securable."; 17 | enableSecurity = ThermalExpansion.CONFIG.get("Security", "Device.All.Securable", true, comment); 18 | } 19 | 20 | public TileDeviceBase() { 21 | 22 | sideConfig = defaultSideConfig[this.getType()]; 23 | setDefaultSides(); 24 | } 25 | 26 | @Override 27 | public String getTileName() { 28 | 29 | return "tile.thermalexpansion.device." + BlockDevice.Type.byMetadata(getType()).getName() + ".name"; 30 | } 31 | 32 | public boolean isAugmentable() { 33 | 34 | return false; 35 | } 36 | 37 | @Override 38 | public boolean enableSecurity() { 39 | 40 | return enableSecurity; 41 | } 42 | 43 | @Override 44 | public boolean sendRedstoneUpdates() { 45 | 46 | return true; 47 | } 48 | 49 | protected void setLevelFlags() { 50 | 51 | level = 0; 52 | hasAutoInput = false; 53 | hasAutoOutput = false; 54 | 55 | hasRedstoneControl = true; 56 | hasAdvRedstoneControl = false; 57 | } 58 | 59 | /* IReconfigurableFacing */ 60 | @Override 61 | public boolean setFacing(int side) { 62 | 63 | if (side < 2 || side > 5) { 64 | return false; 65 | } 66 | facing = (byte) side; 67 | sideCache[facing] = 0; 68 | markDirty(); 69 | sendUpdatePacket(Side.CLIENT); 70 | return true; 71 | } 72 | 73 | /* ISidedTexture */ 74 | @Override 75 | public TextureAtlasSprite getTexture(int side, int layer, int pass) { 76 | 77 | if (layer == 0) { 78 | return side != facing ? TETextures.DEVICE_SIDE : redstoneControlOrDisable() ? TETextures.DEVICE_ACTIVE[getType()] : TETextures.DEVICE_FACE[getType()]; 79 | } else if (side < 6) { 80 | return TETextures.CONFIG[sideConfig.sideTex[sideCache[side]]]; 81 | } 82 | return TETextures.DEVICE_SIDE; 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/simple/BlockAirBase.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.simple; 2 | 3 | import cofh.core.CoFHProps; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.block.material.MapColor; 6 | import net.minecraft.block.material.Material; 7 | import net.minecraft.block.state.IBlockState; 8 | import net.minecraft.item.ItemStack; 9 | import net.minecraft.util.EnumBlockRenderType; 10 | import net.minecraft.util.math.AxisAlignedBB; 11 | import net.minecraft.util.math.BlockPos; 12 | import net.minecraft.world.IBlockAccess; 13 | import net.minecraft.world.World; 14 | 15 | import javax.annotation.Nullable; 16 | import java.util.List; 17 | import java.util.Random; 18 | 19 | public class BlockAirBase extends Block { 20 | 21 | public static final Material materialBarrier = new Material(MapColor.AIR).setReplaceable(); 22 | public static final AxisAlignedBB EMPTY_AABB = new AxisAlignedBB(0D, 0D, 0D, 0D, 0D, 0D); 23 | 24 | public BlockAirBase(Material material) { 25 | 26 | super(material); 27 | disableStats(); 28 | } 29 | 30 | @Nullable 31 | @Override 32 | public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos) { 33 | 34 | return NULL_AABB; 35 | } 36 | 37 | @Override 38 | public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { 39 | 40 | return EMPTY_AABB; 41 | } 42 | 43 | @Override 44 | public EnumBlockRenderType getRenderType(IBlockState state) { 45 | 46 | return EnumBlockRenderType.INVISIBLE; 47 | } 48 | 49 | @Override 50 | public boolean isAir(IBlockState state, IBlockAccess world, BlockPos pos) { 51 | 52 | return true; 53 | } 54 | 55 | @Override 56 | public boolean isOpaqueCube(IBlockState state) { 57 | 58 | return false; 59 | } 60 | 61 | @Override 62 | public boolean isFullCube(IBlockState state) { 63 | 64 | return false; 65 | } 66 | 67 | @Override 68 | public boolean isReplaceable(IBlockAccess worldIn, BlockPos pos) { 69 | 70 | return true; 71 | } 72 | 73 | @Override 74 | public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) { 75 | 76 | } 77 | 78 | @Override 79 | public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { 80 | 81 | return CoFHProps.NO_DROP; 82 | } 83 | 84 | @Override 85 | public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune) { 86 | 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/plugins/nei/handlers/NEIRecipeWrapper.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.plugins.nei.handlers; 2 | 3 | import net.minecraftforge.common.ForgeHooks; 4 | import net.minecraftforge.fml.common.Loader; 5 | import net.minecraftforge.fml.common.registry.GameRegistry; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | import net.minecraft.inventory.InventoryCrafting; 11 | import net.minecraft.item.ItemStack; 12 | import net.minecraft.item.crafting.IRecipe; 13 | import net.minecraft.world.World; 14 | 15 | // Simple wrapper class to hide recipes from NEI 16 | public class NEIRecipeWrapper implements IRecipe { 17 | 18 | public enum RecipeType { 19 | MACHINE, UPGRADE, SECURE 20 | } 21 | 22 | private final IRecipe recipe; 23 | 24 | public final RecipeType type; 25 | 26 | public static void addMachineRecipe(IRecipe recipe) { 27 | 28 | GameRegistry.addRecipe(wrap(recipe, RecipeType.MACHINE)); 29 | } 30 | 31 | public static void addUpgradeRecipe(IRecipe recipe) { 32 | 33 | GameRegistry.addRecipe(wrap(recipe, RecipeType.UPGRADE)); 34 | } 35 | 36 | public static void addSecureRecipe(IRecipe recipe) { 37 | 38 | GameRegistry.addRecipe(wrap(recipe, RecipeType.SECURE)); 39 | } 40 | 41 | public final static List originalRecipeList = new ArrayList(); 42 | 43 | public static IRecipe wrap(IRecipe recipe, RecipeType type) { 44 | 45 | if (Loader.isModLoaded("NotEnoughItems")) { 46 | originalRecipeList.add(recipe); 47 | return new NEIRecipeWrapper(recipe, type); 48 | } else { 49 | return recipe; 50 | } 51 | } 52 | 53 | private NEIRecipeWrapper(IRecipe recipe, RecipeType type) { 54 | 55 | this.recipe = recipe; 56 | this.type = type; 57 | } 58 | 59 | public RecipeType getRecipeType() { 60 | 61 | return type; 62 | } 63 | 64 | public IRecipe getWrappedRecipe() { 65 | 66 | return recipe; 67 | } 68 | 69 | @Override 70 | public boolean matches(InventoryCrafting inv, World world) { 71 | 72 | return recipe.matches(inv, world); 73 | } 74 | 75 | @Override 76 | public ItemStack getCraftingResult(InventoryCrafting inv) { 77 | 78 | return recipe.getCraftingResult(inv); 79 | } 80 | 81 | @Override 82 | public int getRecipeSize() { 83 | 84 | return recipe.getRecipeSize(); 85 | } 86 | 87 | @Override 88 | public ItemStack getRecipeOutput() { 89 | 90 | return recipe.getRecipeOutput(); 91 | } 92 | 93 | @Override 94 | public ItemStack[] getRemainingItems(InventoryCrafting inv) { 95 | return ForgeHooks.defaultRecipeGetRemainingItems(inv); 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/plate/ItemBlockPlate.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.plate; 2 | 3 | import cofh.lib.util.helpers.ItemHelper; 4 | import cofh.lib.util.helpers.SecurityHelper; 5 | import cofh.lib.util.helpers.StringHelper; 6 | 7 | import java.util.List; 8 | 9 | import net.minecraft.block.Block; 10 | import net.minecraft.block.state.IBlockState; 11 | import net.minecraft.entity.player.EntityPlayer; 12 | import net.minecraft.item.ItemBlock; 13 | import net.minecraft.item.ItemStack; 14 | import net.minecraft.tileentity.TileEntity; 15 | import net.minecraft.util.EnumFacing; 16 | import net.minecraft.util.math.BlockPos; 17 | import net.minecraft.world.World; 18 | 19 | public class ItemBlockPlate extends ItemBlock { 20 | 21 | public ItemBlockPlate(Block block) { 22 | 23 | super(block); 24 | setHasSubtypes(true); 25 | setMaxDamage(0); 26 | } 27 | 28 | @Override 29 | public String getItemStackDisplayName(ItemStack stack) { 30 | 31 | return StringHelper.localize(getUnlocalizedName(stack)); 32 | } 33 | 34 | @Override 35 | public String getUnlocalizedName(ItemStack stack) { 36 | 37 | return "tile.thermalexpansion.plate." + BlockPlate.NAMES[ItemHelper.getItemDamage(stack)] + ".name"; 38 | } 39 | 40 | @Override 41 | public int getMetadata(int i) { 42 | 43 | return i; 44 | } 45 | 46 | @Override 47 | public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState) { 48 | if (super.placeBlockAt(stack, player, world, pos, side, hitX, hitY, hitZ, newState)) { 49 | TileEntity te = world.getTileEntity(pos); 50 | if (te instanceof TilePlateBase) { 51 | ((TilePlateBase) te).setAlignment(side.ordinal() ^ 1, hitX - 0.5f, hitY - 0.5f, hitZ - 0.5f); 52 | } 53 | return true; 54 | } 55 | return false; 56 | } 57 | 58 | @Override 59 | public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean check) { 60 | 61 | if (ItemHelper.getItemDamage(stack) <= 0) { 62 | return; 63 | } 64 | SecurityHelper.addOwnerInformation(stack, list); 65 | if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) { 66 | list.add(StringHelper.shiftForDetails()); 67 | } 68 | if (!StringHelper.isShiftKeyDown()) { 69 | return; 70 | } 71 | SecurityHelper.addAccessInformation(stack, list); 72 | 73 | list.add(StringHelper.getInfoText("info.thermalexpansion.plate." + BlockPlate.NAMES[ItemHelper.getItemDamage(stack)])); 74 | list.add(StringHelper.getNoticeText("info.thermalexpansion.multimeter")); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/plugins/nei/NEIRecipeOverlayHandler.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.plugins.nei; 2 | 3 | import codechicken.nei.api.IOverlayHandler; 4 | import codechicken.nei.api.stack.PositionedStack; 5 | import codechicken.nei.recipe.IRecipeHandler; 6 | import cofh.core.network.PacketCoFHBase; 7 | import cofh.core.network.PacketHandler; 8 | import cofh.core.network.PacketTileInfo; 9 | import cofh.lib.gui.GuiBase; 10 | import cofh.thermalexpansion.block.workbench.TileWorkbench; 11 | import cofh.thermalexpansion.gui.client.GuiWorkbench; 12 | 13 | import java.util.List; 14 | 15 | import net.minecraft.client.gui.inventory.GuiContainer; 16 | import net.minecraft.inventory.Slot; 17 | 18 | public class NEIRecipeOverlayHandler implements IOverlayHandler { 19 | 20 | public int xOffset = 19; 21 | public int yOffset = 13; 22 | 23 | public NEIRecipeOverlayHandler() { 24 | 25 | } 26 | 27 | public NEIRecipeOverlayHandler(int x, int y) { 28 | 29 | xOffset = x; 30 | yOffset = y; 31 | } 32 | 33 | @Override 34 | public void overlayRecipe(GuiContainer firstGui, IRecipeHandler recipe, int recipeIndex, boolean shift) { 35 | 36 | if (firstGui instanceof GuiWorkbench) { 37 | for (Object curObj : firstGui.inventorySlots.inventorySlots) { 38 | Slot curSlot = (Slot) curObj; 39 | curSlot.putStack(null); 40 | } 41 | switch (((GuiWorkbench) firstGui).myTile.type) { 42 | case 1: 43 | xOffset = 19; 44 | break; 45 | case 2: 46 | xOffset = 19 + 10; 47 | break; 48 | case 3: 49 | xOffset = 19 + 10 + 26; 50 | break; 51 | default: 52 | xOffset = 19 + 10 + 26 + 18; 53 | break; 54 | } 55 | PacketCoFHBase payload = PacketTileInfo.newPacket(((GuiWorkbench) firstGui).myTile); 56 | payload.addByte(TileWorkbench.PacketInfoID.NEI_SUP.ordinal()); 57 | boolean foundSlots = false; 58 | List item = recipe.getIngredientStacks(recipeIndex); 59 | 60 | for (PositionedStack curItem : item) { 61 | for (Object curObj : firstGui.inventorySlots.inventorySlots) { 62 | Slot curSlot = (Slot) curObj; 63 | if (curSlot.xDisplayPosition == curItem.relx + xOffset && curSlot.yDisplayPosition == curItem.rely + yOffset) { 64 | curSlot.putStack(curItem.item.copy()); 65 | foundSlots = true; 66 | payload.addByte(curSlot.getSlotIndex()); 67 | payload.addItemStack(curItem.item); 68 | break; 69 | } 70 | } 71 | } 72 | payload.addByte(-1); 73 | ((GuiBase) firstGui).overlayRecipe(); 74 | 75 | if (foundSlots) { 76 | PacketHandler.sendToServer(payload); 77 | } 78 | } 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/cofh/core/util/RegistrySocial.java: -------------------------------------------------------------------------------- 1 | package cofh.core.util; 2 | 3 | import cofh.core.init.CoreProps; 4 | import cofh.core.network.PacketHandler; 5 | import cofh.core.network.PacketSocial; 6 | import cofh.core.network.PacketSocial.PacketTypes; 7 | import com.mojang.authlib.GameProfile; 8 | import net.minecraft.entity.player.EntityPlayerMP; 9 | import net.minecraftforge.common.config.Configuration; 10 | 11 | import java.io.File; 12 | import java.util.LinkedList; 13 | import java.util.List; 14 | import java.util.Locale; 15 | 16 | public class RegistrySocial { 17 | 18 | public static void initialize() { 19 | 20 | friendConf = new Configuration(new File(CoreProps.configDir, "/cofh/core/friends.cfg")); 21 | friendConf.load(); 22 | } 23 | 24 | public static Configuration friendConf; 25 | public static List clientPlayerFriends = new LinkedList<>(); 26 | 27 | public synchronized static boolean addFriend(GameProfile owner, String friendName) { 28 | 29 | if (owner == null || friendName == null) { 30 | return false; 31 | } 32 | friendConf.get(owner.getId().toString(), friendName.toLowerCase(Locale.US), 1); 33 | friendConf.save(); 34 | return true; 35 | } 36 | 37 | public synchronized static boolean removeFriend(GameProfile owner, String friendName) { 38 | 39 | if (owner == null || friendName == null) { 40 | return false; 41 | } 42 | String id = owner.getId().toString(); 43 | friendName = friendName.toLowerCase(Locale.US); 44 | if (friendConf.hasCategory(id)) { 45 | if (friendConf.getCategory(id).containsKey(friendName)) { 46 | friendConf.getCategory(id).remove(friendName); 47 | friendConf.save(); 48 | return true; 49 | } 50 | } 51 | return false; 52 | } 53 | 54 | public static boolean playerHasAccess(String playerName, GameProfile owner) { 55 | 56 | if (owner == null || playerName == null) { 57 | return false; 58 | } 59 | if (playerName.equals(owner.getName())) { 60 | return true; 61 | } 62 | String id = owner.getId().toString(); 63 | return (friendConf.hasCategory(id) && friendConf.getCategory(id).containsKey(playerName.toLowerCase(Locale.US))); 64 | } 65 | 66 | public synchronized static void sendFriendsToPlayer(EntityPlayerMP thePlayer) { 67 | 68 | PacketSocial aPacket = new PacketSocial(); 69 | aPacket.addByte(PacketTypes.FRIEND_LIST.ordinal()); 70 | String id = thePlayer.getGameProfile().getId().toString(); 71 | aPacket.addInt(friendConf.getCategory(id).keySet().size()); 72 | for (String theName : friendConf.getCategory(id).keySet()) { 73 | aPacket.addString(theName); 74 | } 75 | PacketHandler.sendTo(aPacket, thePlayer); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/sponge/TileSpongeMagmatic.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.sponge; 2 | 3 | import cofh.lib.util.helpers.FluidHelper; 4 | import cofh.lib.util.helpers.ServerHelper; 5 | import cofh.thermalexpansion.init.TEBlocksOld; 6 | import net.minecraft.block.state.IBlockState; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraftforge.fluids.Fluid; 9 | import net.minecraftforge.fluids.FluidStack; 10 | import net.minecraftforge.fml.common.registry.GameRegistry; 11 | 12 | public class TileSpongeMagmatic extends TileSponge { 13 | 14 | public static void initialize() { 15 | 16 | GameRegistry.registerTileEntity(TileSpongeMagmatic.class, "thermalexpansion.SpongeMagmatic"); 17 | } 18 | 19 | public TileSpongeMagmatic() { 20 | 21 | } 22 | 23 | public TileSpongeMagmatic(int metadata) { 24 | 25 | super(metadata); 26 | } 27 | 28 | @Override 29 | public int getType() { 30 | 31 | return BlockSponge.Types.MAGMATIC.ordinal(); 32 | } 33 | 34 | @Override 35 | public void placeAir() { 36 | 37 | if (ServerHelper.isClientWorld(worldObj)) { 38 | return; 39 | } 40 | if (fullOnPlace) { 41 | return; 42 | } 43 | IBlockState query; 44 | int queryMeta; 45 | Fluid queryFluid; 46 | int bucketCounter = 0; 47 | for (int x = -1; x <= 1; x++) { 48 | for (int y = -1; y <= 1; y++) { 49 | for (int z = -1; z <= 1; z++) { 50 | BlockPos offsetPos = getPos().add(x, y, z); 51 | query = worldObj.getBlockState(offsetPos); 52 | queryMeta = query.getBlock().getMetaFromState(query); 53 | 54 | if (queryMeta == 0) { 55 | queryFluid = FluidHelper.lookupFluidForBlock(query.getBlock()); 56 | if (!full && queryFluid != null) { 57 | if (myFluidStack == null) { 58 | myFluidStack = new FluidStack(queryFluid, 1000); 59 | bucketCounter = 1; 60 | worldObj.setBlockState(offsetPos, TEBlocksOld.blockAirBarrier.getDefaultState(), 3); 61 | } else if (myFluidStack.getFluid() == queryFluid) { 62 | bucketCounter++; 63 | worldObj.setBlockState(offsetPos, TEBlocksOld.blockAirBarrier.getDefaultState(), 3); 64 | } 65 | } else if (query.getBlock().isAir(query, worldObj, offsetPos)) { 66 | worldObj.setBlockState(offsetPos, TEBlocksOld.blockAirBarrier.getDefaultState(), 3); 67 | } 68 | } else if (query.getBlock().isAir(query, worldObj, offsetPos) || query.getMaterial().isLiquid()) { 69 | worldObj.setBlockState(offsetPos, TEBlocksOld.blockAirBarrier.getDefaultState(), 3); 70 | } 71 | } 72 | } 73 | } 74 | if (myFluidStack != null) { 75 | myFluidStack.amount = bucketCounter * 1000; 76 | full = true; 77 | } 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/cache/ItemBlockCache.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.cache; 2 | 3 | import cofh.core.block.ItemBlockCore; 4 | import cofh.lib.util.helpers.ItemHelper; 5 | import cofh.lib.util.helpers.StringHelper; 6 | import net.minecraft.block.Block; 7 | import net.minecraft.entity.player.EntityPlayer; 8 | import net.minecraft.item.EnumRarity; 9 | import net.minecraft.item.ItemStack; 10 | 11 | import java.util.List; 12 | 13 | public class ItemBlockCache extends ItemBlockCore { 14 | 15 | public ItemBlockCache(Block block) { 16 | 17 | super(block); 18 | setHasSubtypes(true); 19 | setMaxDamage(0); 20 | setMaxStackSize(1); 21 | setNoRepair(); 22 | } 23 | 24 | @Override 25 | public int getItemStackLimit(ItemStack stack) { 26 | 27 | if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("Item")) { 28 | return super.getItemStackLimit(stack); 29 | } 30 | return 64; 31 | } 32 | 33 | @Override 34 | public String getUnlocalizedName(ItemStack stack) { 35 | 36 | return "tile.thermalexpansion.cache." + BlockCache.NAMES[ItemHelper.getItemDamage(stack)] + ".name"; 37 | } 38 | 39 | @Override 40 | public EnumRarity getRarity(ItemStack stack) { 41 | 42 | switch (BlockCache.Types.values()[ItemHelper.getItemDamage(stack)]) { 43 | case CREATIVE: 44 | return EnumRarity.EPIC; 45 | case RESONANT: 46 | return EnumRarity.RARE; 47 | case REINFORCED: 48 | return EnumRarity.UNCOMMON; 49 | default: 50 | return EnumRarity.COMMON; 51 | } 52 | } 53 | 54 | @Override 55 | public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean check) { 56 | 57 | if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) { 58 | list.add(StringHelper.shiftForDetails()); 59 | } 60 | if (!StringHelper.isShiftKeyDown()) { 61 | return; 62 | } 63 | list.add(StringHelper.localize("info.cofh.capacity") + ": " + TileCache.CAPACITY[ItemHelper.getItemDamage(stack)]); 64 | if (stack.getTagCompound() == null) { 65 | list.add(StringHelper.localize("info.cofh.empty")); 66 | return; 67 | } 68 | boolean lock = stack.getTagCompound().getBoolean("Lock"); 69 | 70 | if (lock) { 71 | list.add(StringHelper.localize("info.cofh.locked")); 72 | } else { 73 | list.add(StringHelper.localize("info.cofh.unlocked")); 74 | } 75 | list.add(StringHelper.localize("info.cofh.contents") + ":"); 76 | 77 | if (stack.getTagCompound().hasKey("Item")) { 78 | ItemStack stored = ItemHelper.readItemStackFromNBT(stack.getTagCompound().getCompoundTag("Item")); 79 | list.add(" " + StringHelper.BRIGHT_GREEN + stored.stackSize + " " + StringHelper.getItemName(stored)); 80 | } 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/gui/client/GuiCache.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.gui.client; 2 | 3 | import cofh.core.gui.GuiBaseAdv; 4 | import cofh.core.gui.element.TabAugment; 5 | import cofh.core.gui.element.TabInfo; 6 | import cofh.core.gui.element.TabSecurity; 7 | import cofh.core.gui.element.TabTutorial; 8 | import cofh.lib.gui.container.IAugmentableContainer; 9 | import cofh.lib.util.helpers.SecurityHelper; 10 | import cofh.lib.util.helpers.StringHelper; 11 | import cofh.thermalexpansion.block.plate.TilePlateImpulse; 12 | import cofh.thermalexpansion.core.TEProps; 13 | import cofh.thermalexpansion.gui.container.ContainerTEBase; 14 | 15 | import java.util.UUID; 16 | 17 | import net.minecraft.entity.player.InventoryPlayer; 18 | import net.minecraft.tileentity.TileEntity; 19 | import net.minecraft.util.ResourceLocation; 20 | 21 | public class GuiCache extends GuiBaseAdv { 22 | 23 | static final String TEX_PATH = TEProps.PATH_GUI + "cache.png"; 24 | static final ResourceLocation TEXTURE = new ResourceLocation(TEX_PATH); 25 | 26 | TilePlateImpulse myTile; 27 | UUID playerName; 28 | 29 | public GuiCache(InventoryPlayer inventory, TileEntity theTile) { 30 | 31 | super(new ContainerTEBase(inventory, theTile, false, false), TEXTURE); 32 | myTile = (TilePlateImpulse) theTile; 33 | name = myTile.getName(); 34 | playerName = SecurityHelper.getID(inventory.player); 35 | drawInventory = false; 36 | this.height = 100; 37 | 38 | // generateInfo("tab.thermalexpansion.cache", 2); 39 | } 40 | 41 | @Override 42 | public void initGui() { 43 | 44 | super.initGui(); 45 | 46 | if (!myInfo.isEmpty()) { 47 | addTab(new TabInfo(this, myInfo)); 48 | } 49 | addTab(new TabAugment(this, (IAugmentableContainer) inventorySlots)); 50 | if (myTile.enableSecurity() && myTile.isSecured()) { 51 | addTab(new TabSecurity(this, myTile, playerName)); 52 | } 53 | String myTutorial = StringHelper.tutorialTabAugment(); 54 | if (myTile.enableSecurity() && myTile.isSecured()) { 55 | myTutorial += "\n\n" + StringHelper.tutorialTabSecurity(); 56 | } 57 | // redstoneTab = addTab(new TabRedstone(this, myTile)); 58 | // if (myTile.augmentRedstoneControl) { 59 | // myTutorial += "\n\n" + StringHelper.tutorialTabRedstone(); 60 | // } 61 | // if (myTile.augmentReconfigSides) { 62 | // myTutorial += "\n\n" + StringHelper.tutorialTabConfiguration(); 63 | // } 64 | addTab(new TabTutorial(this, myTutorial)); 65 | } 66 | 67 | @Override 68 | protected void updateElementInformation() { 69 | 70 | } 71 | 72 | @Override 73 | public void updateScreen() { 74 | 75 | super.updateScreen(); 76 | 77 | if (!myTile.canAccess()) { 78 | this.mc.thePlayer.closeScreen(); 79 | } 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/gui/client/plate/GuiPlateCharge.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.gui.client.plate; 2 | 3 | import cofh.core.gui.GuiBaseAdv; 4 | import cofh.core.gui.element.TabInfo; 5 | import cofh.core.gui.element.TabSecurity; 6 | import cofh.lib.gui.element.ElementButton; 7 | import cofh.lib.gui.element.ElementEnergyStored; 8 | import cofh.lib.util.helpers.SecurityHelper; 9 | import cofh.thermalexpansion.block.plate.TilePlateCharge; 10 | import cofh.thermalexpansion.core.TEProps; 11 | import cofh.thermalexpansion.gui.container.ContainerTEBase; 12 | 13 | import java.util.UUID; 14 | 15 | import net.minecraft.entity.player.InventoryPlayer; 16 | import net.minecraft.tileentity.TileEntity; 17 | import net.minecraft.util.ResourceLocation; 18 | 19 | public class GuiPlateCharge extends GuiBaseAdv { 20 | 21 | static final String TEX_PATH = TEProps.PATH_GUI + "plate/plate.png"; 22 | static final ResourceLocation TEXTURE = new ResourceLocation(TEX_PATH); 23 | 24 | TilePlateCharge myTile; 25 | UUID playerName; 26 | 27 | ElementButton settingItems; 28 | 29 | public GuiPlateCharge(InventoryPlayer inventory, TileEntity theTile) { 30 | 31 | super(new ContainerTEBase(inventory, theTile, false, false), TEXTURE); 32 | 33 | myTile = (TilePlateCharge) theTile; 34 | name = myTile.getName(); 35 | playerName = SecurityHelper.getID(inventory.player); 36 | drawInventory = false; 37 | this.ySize = 100; 38 | 39 | generateInfo("tab.thermalexpansion.plate.charge", 2); 40 | } 41 | 42 | @Override 43 | public void initGui() { 44 | 45 | super.initGui(); 46 | 47 | addTab(new TabInfo(this, myInfo)); 48 | if (myTile.enableSecurity() && myTile.isSecured()) { 49 | addTab(new TabSecurity(this, myTile, playerName)); 50 | } 51 | addElement(new ElementEnergyStored(this, 16, 25, myTile.getEnergyStorage())); 52 | 53 | settingItems = new ElementButton(this, 120, 36, "Items", 176, 42, 176, 62, 176, 82, 20, 20, TEX_PATH); 54 | 55 | addElement(settingItems); 56 | } 57 | 58 | @Override 59 | public void updateScreen() { 60 | 61 | super.updateScreen(); 62 | 63 | if (!myTile.canAccess()) { 64 | this.mc.thePlayer.closeScreen(); 65 | } 66 | } 67 | 68 | @Override 69 | protected void updateElementInformation() { 70 | 71 | int x = !myTile.chargeItems ? 196 : 176; 72 | settingItems.setDisabledX(x); 73 | settingItems.setHoverX(x); 74 | settingItems.setSheetX(x); 75 | 76 | settingItems.setToolTip("info.thermalexpansion.plate.charge." + (myTile.chargeItems ? "anything" : "playersOnly")); 77 | } 78 | 79 | @Override 80 | public void handleElementButtonClick(String buttonName, int mouseButton) { 81 | 82 | if (buttonName.equalsIgnoreCase("Items")) { 83 | myTile.chargeItems = !myTile.chargeItems; 84 | 85 | playClickSound(1.0F, myTile.chargeItems ? 0.8F : 0.6F); 86 | } 87 | myTile.sendModePacket(); 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/plugins/eio/EIOPlugin.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.plugins.eio; 2 | 3 | import cofh.asm.relauncher.Strippable; 4 | import cofh.lib.util.helpers.ItemHelper; 5 | import cofh.thermalexpansion.ThermalExpansion; 6 | import cofh.thermalexpansion.util.crafting.SmelterManager; 7 | 8 | import net.minecraft.init.Blocks; 9 | import net.minecraft.init.Items; 10 | import net.minecraft.item.ItemStack; 11 | 12 | public class EIOPlugin { 13 | 14 | public static void preInit() { 15 | 16 | } 17 | 18 | public static void initialize() { 19 | 20 | } 21 | 22 | public static void postInit() { 23 | 24 | } 25 | 26 | @Strippable("mod:EnderIO") 27 | public static void loadComplete() { 28 | 29 | if (ItemHelper.oreNameExists("ingotConductiveIron")) { 30 | SmelterManager.addAlloyRecipe(6000, new ItemStack(Items.IRON_INGOT), new ItemStack(Items.REDSTONE), 31 | ItemHelper.cloneStack(ItemHelper.getOre("ingotConductiveIron"), 1)); 32 | } 33 | if (ItemHelper.oreNameExists("ingotPhasedGold") && ItemHelper.oreNameExists("ingotEnergeticAlloy")) { 34 | SmelterManager.addAlloyRecipe(6000, ItemHelper.cloneStack(ItemHelper.getOre("ingotEnergeticAlloy"), 1), new ItemStack(Items.ENDER_PEARL), 35 | ItemHelper.cloneStack(ItemHelper.getOre("ingotPhasedGold"), 1)); 36 | } 37 | if (ItemHelper.oreNameExists("ingotPhasedIron")) { 38 | SmelterManager.addAlloyRecipe(6000, new ItemStack(Items.IRON_INGOT), new ItemStack(Items.ENDER_PEARL), 39 | ItemHelper.cloneStack(ItemHelper.getOre("ingotPhasedIron"), 1)); 40 | } 41 | if (ItemHelper.oreNameExists("ingotSoularium")) { 42 | SmelterManager.addAlloyRecipe(6000, new ItemStack(Items.GOLD_INGOT), new ItemStack(Blocks.SOUL_SAND), 43 | ItemHelper.cloneStack(ItemHelper.getOre("ingotSoularium"), 1)); 44 | } 45 | if (ItemHelper.oreNameExists("ingotSteel")) { 46 | if (ItemHelper.oreNameExists("ingotDarkSteel")) { 47 | SmelterManager.addAlloyRecipe(12000, "ingotSteel", 1, "dustObsidian", 4, ItemHelper.cloneStack(ItemHelper.getOre("ingotDarkSteel"), 1)); 48 | SmelterManager.addAlloyRecipe(12000, "dustSteel", 1, "dustObsidian", 4, ItemHelper.cloneStack(ItemHelper.getOre("ingotDarkSteel"), 1)); 49 | } 50 | if (ItemHelper.oreNameExists("ingotElectricalSteel")) { 51 | SmelterManager.addAlloyRecipe(6000, "ingotSteel", 1, "itemSilicon", 1, ItemHelper.cloneStack(ItemHelper.getOre("ingotElectricalSteel"), 1)); 52 | SmelterManager.addAlloyRecipe(6000, "dustSteel", 1, "itemSilicon", 1, ItemHelper.cloneStack(ItemHelper.getOre("ingotElectricalSteel"), 1)); 53 | } 54 | } 55 | if (ItemHelper.oreNameExists("ingotRedstoneAlloy")) { 56 | SmelterManager.addAlloyRecipe(6000, "dustRedstone", 1, "itemSilicon", 1, ItemHelper.cloneStack(ItemHelper.getOre("ingotRedstoneAlloy"), 1)); 57 | } 58 | ThermalExpansion.log.info("Thermal Expansion: EnderIO Plugin Enabled."); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/light/ItemBlockLight.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.light; 2 | 3 | import cofh.lib.util.helpers.ItemHelper; 4 | import cofh.lib.util.helpers.StringHelper; 5 | 6 | import java.util.List; 7 | 8 | import net.minecraft.block.Block; 9 | import net.minecraft.block.state.IBlockState; 10 | import net.minecraft.entity.player.EntityPlayer; 11 | import net.minecraft.item.ItemBlock; 12 | import net.minecraft.item.ItemStack; 13 | import net.minecraft.nbt.NBTTagCompound; 14 | import net.minecraft.util.EnumFacing; 15 | import net.minecraft.util.math.BlockPos; 16 | import net.minecraft.world.World; 17 | 18 | public class ItemBlockLight extends ItemBlock { 19 | 20 | public static ItemStack setDefaultTag(ItemStack container, int style) { 21 | 22 | NBTTagCompound tag = new NBTTagCompound(); 23 | tag.setByte("Style", (byte) style); 24 | container.setTagCompound(tag); 25 | return container; 26 | } 27 | 28 | public ItemBlockLight(Block block) { 29 | 30 | super(block); 31 | setHasSubtypes(true); 32 | setMaxDamage(0); 33 | } 34 | 35 | @Override 36 | public String getItemStackDisplayName(ItemStack stack) { 37 | 38 | return StringHelper.localize(getUnlocalizedName(stack)); 39 | } 40 | 41 | @Override 42 | public String getUnlocalizedName(ItemStack stack) { 43 | 44 | return "tile.thermalexpansion.light." + BlockLight.NAMES[ItemHelper.getItemDamage(stack) % BlockLight.Types.values().length] + ".name"; 45 | } 46 | 47 | @Override 48 | public int getMetadata(int i) { 49 | 50 | return i % BlockLight.Types.values().length; 51 | } 52 | 53 | @Override 54 | public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean check) { 55 | 56 | if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) { 57 | list.add(StringHelper.shiftForDetails()); 58 | } 59 | if (!StringHelper.isShiftKeyDown()) { 60 | return; 61 | } 62 | list.add(StringHelper.getInfoText("info.thermalexpansion.light.0")); 63 | list.add(StringHelper.getInfoText("info.thermalexpansion.light.1")); 64 | list.add(StringHelper.getNoticeText("info.thermalexpansion.multimeter")); 65 | } 66 | 67 | @Override 68 | public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState) { 69 | if (!world.setBlockState(pos, newState, 3)) { 70 | return false; 71 | } 72 | if (world.getBlockState(pos).getBlock() == block) { 73 | block.onBlockPlacedBy(world, pos, newState, player, stack); 74 | //block.onPostBlockPlaced(world, x, y, z, metadata); 75 | TileLight tile = (TileLight) world.getTileEntity(pos); 76 | side = EnumFacing.VALUES[Math.min(6, side.ordinal() ^ 1)]; 77 | BlockLight.setTileAlignment(tile, player, stack, side, hitX, hitY, hitZ); 78 | } 79 | return true; 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/simple/BlockAirSignal.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.simple; 2 | 3 | import net.minecraft.block.properties.PropertyInteger; 4 | import net.minecraft.block.state.BlockStateContainer; 5 | import net.minecraft.block.state.IBlockState; 6 | import net.minecraft.client.Minecraft; 7 | import net.minecraft.client.particle.ParticleFirework; 8 | import net.minecraft.util.EnumFacing; 9 | import net.minecraft.util.math.BlockPos; 10 | import net.minecraft.world.IBlockAccess; 11 | import net.minecraft.world.World; 12 | import net.minecraftforge.fml.relauncher.Side; 13 | import net.minecraftforge.fml.relauncher.SideOnly; 14 | 15 | import java.util.Random; 16 | 17 | public class BlockAirSignal extends BlockAirBase /*implements IRedNetOutputNode*/ { 18 | 19 | public static final PropertyInteger INTENSITY = PropertyInteger.create("intensity", 0, 15); 20 | 21 | public BlockAirSignal() { 22 | 23 | super(materialBarrier); 24 | disableStats(); 25 | //setBlockTextureName("glowstone"); 26 | //setBlockBounds(0, 0, 0, 0, 0, 0); 27 | } 28 | 29 | @Override 30 | protected BlockStateContainer createBlockState() { 31 | 32 | return new BlockStateContainer(this, INTENSITY); 33 | } 34 | 35 | @Override 36 | public int getWeakPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { 37 | 38 | return getMetaFromState(blockState); 39 | } 40 | 41 | @Override 42 | public IBlockState getStateFromMeta(int meta) { 43 | 44 | return getDefaultState().withProperty(INTENSITY, meta); 45 | } 46 | 47 | @Override 48 | public int getMetaFromState(IBlockState state) { 49 | 50 | return state.getValue(INTENSITY); 51 | } 52 | 53 | @Override 54 | public boolean canProvidePower(IBlockState state) { 55 | 56 | return true; 57 | } 58 | 59 | @SideOnly (Side.CLIENT) 60 | @Override 61 | public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) { 62 | 63 | ParticleFirework.Spark spark = new ParticleFirework.Spark(world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, rand.nextGaussian() / 10, rand.nextDouble() / 6, rand.nextGaussian() / 10, Minecraft.getMinecraft().effectRenderer); 64 | spark.setColor(0xFF0000); 65 | spark.setColorFade(0x660000); 66 | spark.setTwinkle(true); 67 | Minecraft.getMinecraft().effectRenderer.addEffect(spark); 68 | } 69 | 70 | /* IRedNetOutputNode */ 71 | /*@Override 72 | public RedNetConnectionType getConnectionType(World world, int x, int y, int z, ForgeDirection side) { 73 | 74 | return RedNetConnectionType.PlateSingle; 75 | } 76 | 77 | @Override 78 | public int[] getOutputValues(World world, int x, int y, int z, ForgeDirection side) { 79 | 80 | return null; 81 | } 82 | 83 | @Override 84 | public int getOutputValue(World world, int x, int y, int z, ForgeDirection side, int subnet) { 85 | 86 | return isProvidingWeakPower(world, x, y, z, side.ordinal()); 87 | }*/ 88 | 89 | } 90 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | CoFH "Don't Be a Jerk" License 2 | ==================================== 3 | #### Okay, so here's the deal. 4 | 5 | You'll notice that this repository does not have a license! By default, that means "All Rights Reserved." 6 | 7 | That is indeed the case. All rights reserved, as far as the code is concerned. 8 | 9 | Art and sound assets are released under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0), a summary of which can be found at: https://creativecommons.org/licenses/by-sa/4.0/ 10 | 11 | ©2012-2015 Cult of the Full Hub / Team CoFH / CoFH 12 | 13 | #### Homepage 14 | 15 | [TeamCoFH Home Page](http://teamcofh.com/) 16 | 17 | [IRC #ThermalExpansion on esper.net](http://webchat.esper.net/?nick=ThermalWiki....&channels=ThermalExpansion) 18 | 19 | #### Notice 20 | 21 | Contribution to this repository means that you are granting us rights over the code that you choose to contribute. If you do not agree with that, do not contribute. 22 | 23 | So, why is this here? Well, the rights are reserved, but what that really means is that we choose what to do with the rights. So here you go. 24 | 25 | #### You CAN 26 | - Fork and modify the code. 27 | - Submit Pull Requests to this repository. 28 | - Copy portions of this code for use in other projects. 29 | - Write your own code that uses this code as a dependency. (addon mods!) 30 | 31 | #### You CANNOT 32 | - Redistribute this in its entirety as source or compiled code. 33 | - Create or distribute code which contains 50% or more Functionally Equivalent Statements* from this repository. 34 | 35 | #### You MUST 36 | - Maintain a visible repository of your code which is inspired by, derived from, or copied from this code. Basically, if you use it, pay it forward. You keep rights to your OWN code, but you still must make your source visible. 37 | - Not be a jerk**. Seriously, if you're a jerk, you can't use this code. That's part of the agreement. 38 | 39 | #### Notes, License & Copyright 40 | 41 | *A Functionally Equivalent Statement is a code fragment which, regardless of whitespace and object names, achieves the same result. Basically you can't copy the code, rename the variables, add whitespace and say it's different. It's not. 42 | 43 | **A jerk is anyone who attempts to or intends to claim partial or total ownership of the original or repackaged code and/or attempts to or intends to redistribute original or repackaged code without prior express written permission from the owners (CoFH). 44 | 45 | Essentially, take this and learn from it! Create addon mods that depend on it! If you see something we can improve, tell us. Submit a Pull Request. The one catch: don't steal! A lot of effort has gone into this, and if you were to take this and call it your own, you'd basically be a big jerk. 46 | 47 | Don't be a jerk. 48 | 49 | See LICENSE-CODE.txt and LICENSE-ART.txt for license information. 50 | 51 | ©2012-2015 Cult of the Full Hub / Team CoFH / CoFH 52 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/render/RenderCache.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.render; 2 | 3 | import cofh.core.render.RenderUtils; 4 | import cofh.lib.render.RenderHelper; 5 | import cofh.thermalexpansion.block.cache.TileCache; 6 | import cofh.thermalexpansion.init.TEItemsOld; 7 | import net.minecraft.client.renderer.GlStateManager; 8 | import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; 9 | import net.minecraft.init.Items; 10 | import net.minecraft.item.ItemStack; 11 | import net.minecraft.util.EnumFacing; 12 | import net.minecraftforge.fml.client.registry.ClientRegistry; 13 | import org.lwjgl.opengl.GL11; 14 | 15 | public class RenderCache extends TileEntitySpecialRenderer { 16 | 17 | public static final RenderCache instance = new RenderCache(); 18 | private static ItemStack lock = new ItemStack(Items.APPLE); 19 | 20 | static { 21 | ClientRegistry.bindTileEntitySpecialRenderer(TileCache.class, instance); 22 | } 23 | 24 | public static void initialize() { 25 | 26 | lock = TEItemsOld.lock.copy(); 27 | } 28 | 29 | @Override 30 | public void renderTileEntityAt(TileCache tile, double x, double y, double z, float f, int destroyStage) { 31 | 32 | if (tile.storedStack == null) { 33 | return; 34 | } 35 | if (tile.locked) { 36 | GlStateManager.pushMatrix(); 37 | GlStateManager.pushMatrix(); 38 | 39 | switch (tile.getFacing()) { 40 | case 0: 41 | break; 42 | case 1: 43 | break; 44 | case 2: 45 | GlStateManager.translate(x + 3 / 16f, y + 3 / 16f, z + RenderHelper.RENDER_OFFSET * 150); 46 | break; 47 | case 3: 48 | GlStateManager.translate(x + 13 / 16f, y + 3 / 16f, z + 1 - RenderHelper.RENDER_OFFSET * 150); 49 | GlStateManager.rotate(180, 0, 1, 0); 50 | break; 51 | case 4: 52 | GlStateManager.translate(x + RenderHelper.RENDER_OFFSET * 150, y + 3 / 16f, z + 13 / 16f); 53 | GlStateManager.rotate(90, 0, 1, 0); 54 | break; 55 | case 5: 56 | GlStateManager.translate(x + 1 - RenderHelper.RENDER_OFFSET * 150, y + 3 / 16f, z + 3 / 16f); 57 | GlStateManager.rotate(-90, 0, 1, 0); 58 | break; 59 | default: 60 | } 61 | GlStateManager.scale(0.03125 / 4, 0.03125 / 4, -RenderHelper.RENDER_OFFSET); 62 | GlStateManager.rotate(180, 0, 0, 1); 63 | 64 | RenderUtils.setupLight(tile, EnumFacing.VALUES[tile.getFacing()]); 65 | RenderHelper.enableGUIStandardItemLighting(); 66 | 67 | RenderHelper.renderItem().renderItemAndEffectIntoGUI(lock, 0, 0); 68 | 69 | GlStateManager.enableAlpha(); 70 | GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F); 71 | GlStateManager.enableBlend(); 72 | GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO); 73 | GlStateManager.popMatrix(); 74 | net.minecraft.client.renderer.RenderHelper.enableStandardItemLighting(); 75 | GlStateManager.popMatrix(); 76 | } 77 | GlStateManager.pushMatrix(); 78 | RenderUtils.renderItemOnBlockSide(tile, tile.storedStack, tile.getFacing(), x, y, z); 79 | GlStateManager.popMatrix(); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/plate/TilePlatePoweredBase.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.plate; 2 | 3 | import cofh.api.energy.EnergyStorage; 4 | import cofh.api.energy.IEnergyReceiver; 5 | import cofh.api.energy.IEnergyStorage; 6 | import cofh.core.network.PacketCoFHBase; 7 | import net.minecraft.util.EnumFacing; 8 | import net.minecraftforge.fml.relauncher.Side; 9 | import net.minecraftforge.fml.relauncher.SideOnly; 10 | 11 | import net.minecraft.item.ItemStack; 12 | import net.minecraft.nbt.NBTTagCompound; 13 | 14 | public class TilePlatePoweredBase extends TilePlateBase implements IEnergyReceiver { 15 | 16 | protected EnergyStorage storage; 17 | protected ItemStack energySlot; 18 | 19 | protected TilePlatePoweredBase(BlockPlate.Types type, int storage) { 20 | 21 | super(type); 22 | this.storage = new EnergyStorage(storage); 23 | } 24 | 25 | @Override 26 | public boolean setFacing(int facing) { 27 | 28 | return false; 29 | } 30 | 31 | @Override 32 | void setAlignment(int side, float hitX, float hitY, float hitZ) { 33 | 34 | alignment = (byte) side; 35 | direction = 7; 36 | } 37 | 38 | @Override 39 | public boolean canRotate() { 40 | 41 | return false; 42 | } 43 | 44 | @Override 45 | public void readFromNBT(NBTTagCompound nbt) { 46 | 47 | super.readFromNBT(nbt); 48 | storage.readFromNBT(nbt); 49 | energySlot = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("stack")); 50 | } 51 | 52 | @Override 53 | public NBTTagCompound writeToNBT(NBTTagCompound nbt) { 54 | 55 | super.writeToNBT(nbt); 56 | storage.writeToNBT(nbt); 57 | if (energySlot != null) { 58 | nbt.setTag("stack", energySlot.writeToNBT(new NBTTagCompound())); 59 | } 60 | return nbt; 61 | } 62 | 63 | public ItemStack getEnergySlot() { 64 | 65 | return energySlot; 66 | } 67 | 68 | public void setEnergySlot(ItemStack stack) { 69 | 70 | energySlot = stack; 71 | } 72 | 73 | @Override 74 | public PacketCoFHBase getGuiPacket() { 75 | 76 | PacketCoFHBase payload = super.getGuiPacket(); 77 | 78 | payload.addInt(storage.getEnergyStored()); 79 | 80 | return payload; 81 | } 82 | 83 | @Override 84 | @SideOnly(Side.CLIENT) 85 | protected void handleGuiPacket(PacketCoFHBase payload) { 86 | 87 | super.handleGuiPacket(payload); 88 | 89 | storage.setEnergyStored(payload.getInt()); 90 | } 91 | 92 | @Override 93 | public boolean canConnectEnergy(EnumFacing from) { 94 | 95 | return from.ordinal() == alignment; 96 | } 97 | 98 | @Override 99 | public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) { 100 | 101 | return storage.receiveEnergy(maxReceive, simulate); 102 | } 103 | 104 | @Override 105 | public int getEnergyStored(EnumFacing from) { 106 | 107 | return storage.getEnergyStored(); 108 | } 109 | 110 | @Override 111 | public int getMaxEnergyStored(EnumFacing from) { 112 | 113 | return storage.getMaxEnergyStored(); 114 | } 115 | 116 | public IEnergyStorage getEnergyStorage() { 117 | 118 | return storage; 119 | } 120 | 121 | } 122 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/cell/TileCellCreative.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.cell; 2 | 3 | import codechicken.lib.texture.TextureUtils; 4 | import cofh.core.render.IconRegistry; 5 | import cofh.lib.util.helpers.ServerHelper; 6 | import cofh.thermalexpansion.init.TETextures; 7 | import cofh.thermalfoundation.init.TFFluids; 8 | import net.minecraft.client.renderer.texture.TextureAtlasSprite; 9 | import net.minecraft.nbt.NBTTagCompound; 10 | import net.minecraft.util.EnumFacing; 11 | import net.minecraftforge.fml.common.registry.GameRegistry; 12 | 13 | public class TileCellCreative extends TileCell { 14 | 15 | public static void initialize() { 16 | 17 | GameRegistry.registerTileEntity(TileCellCreative.class, "thermalexpansion.CellCreative"); 18 | } 19 | 20 | public static final byte[] DEFAULT_SIDES = { 1, 1, 1, 1, 1, 1 }; 21 | 22 | public TileCellCreative() { 23 | 24 | energyStorage.setEnergyStored(-1); 25 | } 26 | 27 | public TileCellCreative(int metadata) { 28 | 29 | super(metadata); 30 | energyStorage.setEnergyStored(-1); 31 | } 32 | 33 | @Override 34 | public byte[] getDefaultSides() { 35 | 36 | return DEFAULT_SIDES.clone(); 37 | } 38 | 39 | @Override 40 | public void update() { 41 | 42 | if (ServerHelper.isClientWorld(worldObj)) { 43 | return; 44 | } 45 | if (!cached) { 46 | onNeighborBlockChange(); 47 | } 48 | if (redstoneControlOrDisable()) { 49 | for (int i = 0; i < 6; i++) { 50 | transferEnergy(i); 51 | } 52 | } 53 | } 54 | 55 | @Override 56 | protected void transferEnergy(int bSide) { 57 | 58 | if (sideCache[bSide] != 1) { 59 | return; 60 | } 61 | if (adjacentHandlers[bSide] == null) { 62 | return; 63 | } 64 | adjacentHandlers[bSide].receiveEnergy(EnumFacing.VALUES[bSide ^ 1], energySend, false); 65 | } 66 | 67 | /* NBT METHODS */ 68 | @Override 69 | public void readFromNBT(NBTTagCompound nbt) { 70 | 71 | super.readFromNBT(nbt); 72 | 73 | energyStorage.setEnergyStored(energyStorage.getMaxEnergyStored()); 74 | } 75 | 76 | /* IEnergyHandler */ 77 | @Override 78 | public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) { 79 | 80 | if (from == null || sideCache[from.ordinal()] == 2) { 81 | return Math.min(maxReceive, energyReceive); 82 | } 83 | return 0; 84 | } 85 | 86 | @Override 87 | public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate) { 88 | 89 | if (from == null || sideCache[from.ordinal()] == 1) { 90 | return Math.min(maxExtract, energySend); 91 | } 92 | return 0; 93 | } 94 | 95 | /* ISidedTexture */ 96 | @Override 97 | public TextureAtlasSprite getTexture(int side, int pass) { 98 | 99 | if (pass == 0) { 100 | return TextureUtils.getTexture(TFFluids.fluidRedstone.getStill()); 101 | } else if (pass == 1) { 102 | return TETextures.CELL[type * 2]; 103 | } else if (pass == 2) { 104 | return TETextures.CELL_CONFIG[sideCache[side]]; 105 | } 106 | return side != facing ? TETextures.CELL_CONFIG_NONE : TETextures.CELL_METER_CREATIVE; 107 | } 108 | 109 | } 110 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/nei/NEIThermalFoundationConfig.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalfoundation.plugins.nei; 2 | 3 | import codechicken.nei.api.API; 4 | import codechicken.nei.api.IConfigureNEI; 5 | import cofh.thermalfoundation.ThermalFoundation; 6 | import cofh.thermalfoundation.core.TFProps; 7 | import cofh.thermalfoundation.item.Equipment; 8 | import cofh.thermalfoundation.item.VanillaEquipment; 9 | 10 | import net.minecraft.item.ItemStack; 11 | import net.minecraftforge.oredict.OreDictionary; 12 | 13 | public class NEIThermalFoundationConfig implements IConfigureNEI { 14 | 15 | /* IConfigureNEI */ 16 | @Override 17 | public void loadConfig() { 18 | 19 | if (TFProps.showDisabledEquipment) { 20 | return; 21 | } 22 | for (Equipment e : Equipment.values()) { 23 | if (!e.enableArmor) { 24 | API.hideItem(new ItemStack(e.armorHelmet.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 25 | API.hideItem(new ItemStack(e.armorPlate.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 26 | API.hideItem(new ItemStack(e.armorLegs.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 27 | API.hideItem(new ItemStack(e.armorBoots.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 28 | } 29 | if (!e.enableTools[0]) { 30 | API.hideItem(new ItemStack(e.toolSword.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 31 | } 32 | if (!e.enableTools[1]) { 33 | API.hideItem(new ItemStack(e.toolShovel.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 34 | } 35 | if (!e.enableTools[2]) { 36 | API.hideItem(new ItemStack(e.toolPickaxe.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 37 | } 38 | if (!e.enableTools[3]) { 39 | API.hideItem(new ItemStack(e.toolAxe.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 40 | } 41 | if (!e.enableTools[4]) { 42 | API.hideItem(new ItemStack(e.toolHoe.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 43 | } 44 | if (!e.enableTools[5]) { 45 | API.hideItem(new ItemStack(e.toolShears.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 46 | } 47 | if (!e.enableTools[6]) { 48 | API.hideItem(new ItemStack(e.toolFishingRod.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 49 | } 50 | if (!e.enableTools[7]) { 51 | API.hideItem(new ItemStack(e.toolSickle.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 52 | } 53 | if (!e.enableTools[8]) { 54 | API.hideItem(new ItemStack(e.toolBow.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 55 | } 56 | } 57 | for (VanillaEquipment e : VanillaEquipment.values()) { 58 | if (!e.enableTools[5]) { 59 | API.hideItem(new ItemStack(e.toolShears.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 60 | } 61 | if (!e.enableTools[6]) { 62 | API.hideItem(new ItemStack(e.toolFishingRod.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 63 | } 64 | if (!e.enableTools[7]) { 65 | API.hideItem(new ItemStack(e.toolSickle.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 66 | } 67 | if (!e.enableTools[8]) { 68 | API.hideItem(new ItemStack(e.toolBow.getItem(), 1, OreDictionary.WILDCARD_VALUE)); 69 | } 70 | } 71 | } 72 | 73 | @Override 74 | public String getName() { 75 | 76 | return ThermalFoundation.modName; 77 | } 78 | 79 | @Override 80 | public String getVersion() { 81 | 82 | return ThermalFoundation.version; 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/plugins/nei/NEIThermalExpansionConfig.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.plugins.nei; 2 | 3 | import codechicken.nei.api.API; 4 | import codechicken.nei.api.IConfigureNEI; 5 | import cofh.thermalexpansion.ThermalExpansion; 6 | import cofh.thermalexpansion.block.TEBlocks; 7 | import cofh.thermalexpansion.gui.client.GuiWorkbench; 8 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerCharger; 9 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerCraftingMachine; 10 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerCraftingSecure; 11 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerCraftingUpgrade; 12 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerCrucible; 13 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerFurnace; 14 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerInsolator; 15 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerPulverizer; 16 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerSawmill; 17 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerSmelter; 18 | import cofh.thermalexpansion.plugins.nei.handlers.RecipeHandlerTransposer; 19 | 20 | import net.minecraft.item.ItemStack; 21 | 22 | public class NEIThermalExpansionConfig implements IConfigureNEI { 23 | 24 | /* IConfigureNEI */ 25 | @Override 26 | public void loadConfig() { 27 | 28 | API.registerRecipeHandler(RecipeHandlerCraftingMachine.instance); 29 | API.registerUsageHandler(RecipeHandlerCraftingMachine.instance); 30 | 31 | API.registerRecipeHandler(RecipeHandlerCraftingUpgrade.instance); 32 | API.registerUsageHandler(RecipeHandlerCraftingUpgrade.instance); 33 | 34 | API.registerRecipeHandler(RecipeHandlerCraftingSecure.instance); 35 | API.registerUsageHandler(RecipeHandlerCraftingSecure.instance); 36 | 37 | API.registerRecipeHandler(RecipeHandlerFurnace.instance); 38 | API.registerUsageHandler(RecipeHandlerFurnace.instance); 39 | 40 | API.registerRecipeHandler(RecipeHandlerPulverizer.instance); 41 | API.registerUsageHandler(RecipeHandlerPulverizer.instance); 42 | 43 | API.registerRecipeHandler(RecipeHandlerSawmill.instance); 44 | API.registerUsageHandler(RecipeHandlerSawmill.instance); 45 | 46 | API.registerRecipeHandler(RecipeHandlerSmelter.instance); 47 | API.registerUsageHandler(RecipeHandlerSmelter.instance); 48 | 49 | API.registerRecipeHandler(RecipeHandlerCrucible.instance); 50 | API.registerUsageHandler(RecipeHandlerCrucible.instance); 51 | 52 | API.registerRecipeHandler(RecipeHandlerTransposer.instance); 53 | API.registerUsageHandler(RecipeHandlerTransposer.instance); 54 | 55 | API.registerRecipeHandler(RecipeHandlerInsolator.instance); 56 | API.registerUsageHandler(RecipeHandlerInsolator.instance); 57 | 58 | API.registerRecipeHandler(RecipeHandlerCharger.instance); 59 | API.registerUsageHandler(RecipeHandlerCharger.instance); 60 | 61 | API.registerGuiOverlayHandler(GuiWorkbench.class, new NEIRecipeOverlayHandler(), "crafting"); 62 | 63 | API.hideItem(new ItemStack(TEBlocks.blockAirBarrier)); 64 | API.hideItem(new ItemStack(TEBlocks.blockAirLight)); 65 | API.hideItem(new ItemStack(TEBlocks.blockAirSignal)); 66 | } 67 | 68 | @Override 69 | public String getName() { 70 | 71 | return ThermalExpansion.modName; 72 | } 73 | 74 | @Override 75 | public String getVersion() { 76 | 77 | return ThermalExpansion.version; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/strongbox/ItemBlockStrongbox.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.strongbox; 2 | 3 | import cofh.api.item.IInventoryContainerItem; 4 | import cofh.core.CoFHProps; 5 | import cofh.core.enchantment.CoFHEnchantment; 6 | import cofh.core.block.ItemBlockCore; 7 | import cofh.lib.util.helpers.ItemHelper; 8 | import cofh.lib.util.helpers.SecurityHelper; 9 | import cofh.lib.util.helpers.StringHelper; 10 | import cofh.thermalexpansion.block.EnumType; 11 | import net.minecraft.block.Block; 12 | import net.minecraft.enchantment.EnchantmentHelper; 13 | import net.minecraft.entity.player.EntityPlayer; 14 | import net.minecraft.item.EnumRarity; 15 | import net.minecraft.item.ItemStack; 16 | import net.minecraftforge.common.util.Constants; 17 | 18 | import java.util.List; 19 | 20 | public class ItemBlockStrongbox extends ItemBlockCore implements IInventoryContainerItem { 21 | 22 | public ItemBlockStrongbox(Block block) { 23 | 24 | super(block); 25 | setHasSubtypes(true); 26 | setMaxDamage(0); 27 | setMaxStackSize(1); 28 | setNoRepair(); 29 | } 30 | 31 | @Override 32 | public int getItemStackLimit(ItemStack stack) { 33 | 34 | if (stack.getTagCompound() != null && !(!stack.getTagCompound().hasKey("Inventory", Constants.NBT.TAG_LIST) || stack.getTagCompound().getTagList("Inventory", stack.getTagCompound().getId()).tagCount() <= 0)) { 35 | return super.getItemStackLimit(stack); 36 | } 37 | return 64; 38 | } 39 | 40 | @Override 41 | public String getUnlocalizedName(ItemStack stack) { 42 | 43 | return "tile.thermalexpansion.strongbox." + BlockStrongbox.NAMES[ItemHelper.getItemDamage(stack)] + ".name"; 44 | } 45 | 46 | @Override 47 | public EnumRarity getRarity(ItemStack stack) { 48 | 49 | switch (EnumType.values()[ItemHelper.getItemDamage(stack)]) { 50 | case CREATIVE: 51 | return EnumRarity.EPIC; 52 | case RESONANT: 53 | return EnumRarity.RARE; 54 | case REINFORCED: 55 | return EnumRarity.UNCOMMON; 56 | default: 57 | return EnumRarity.COMMON; 58 | } 59 | } 60 | 61 | @Override 62 | public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean check) { 63 | 64 | SecurityHelper.addOwnerInformation(stack, list); 65 | if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) { 66 | list.add(StringHelper.shiftForDetails()); 67 | } 68 | if (!StringHelper.isShiftKeyDown()) { 69 | return; 70 | } 71 | SecurityHelper.addAccessInformation(stack, list); 72 | ItemHelper.addInventoryInformation(stack, list); 73 | } 74 | 75 | @Override 76 | public int getItemEnchantability() { 77 | 78 | return 10; 79 | } 80 | 81 | @Override 82 | public boolean isItemTool(ItemStack stack) { 83 | 84 | return true; 85 | } 86 | 87 | public static int getStorageIndex(int type, int enchant) { 88 | 89 | return type > 0 ? 2 * type + enchant : 0; 90 | } 91 | 92 | public static int getStorageIndex(ItemStack container) { 93 | 94 | int type = container.getItemDamage(); 95 | int enchant = EnchantmentHelper.getEnchantmentLevel(CoFHEnchantment.holding, container); 96 | 97 | return getStorageIndex(type, enchant); 98 | } 99 | 100 | /* IInventoryContainerItem */ 101 | @Override 102 | public int getSizeInventory(ItemStack container) { 103 | 104 | return CoFHProps.STORAGE_SIZE[Math.min(12, getStorageIndex(container))]; 105 | } 106 | 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/ender/ItemBlockEnder.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.ender; 2 | 3 | import cofh.api.tileentity.IRedstoneControl.ControlMode; 4 | import cofh.core.item.ItemBlockBase; 5 | import cofh.lib.util.helpers.RedstoneControlHelper; 6 | import cofh.lib.util.helpers.SecurityHelper; 7 | import cofh.lib.util.helpers.StringHelper; 8 | 9 | import java.util.List; 10 | 11 | import net.minecraft.block.Block; 12 | import net.minecraft.entity.player.EntityPlayer; 13 | import net.minecraft.item.EnumRarity; 14 | import net.minecraft.item.ItemStack; 15 | 16 | public class ItemBlockEnder extends ItemBlockBase { 17 | 18 | public static ItemStack setDefaultTag(ItemStack container) { 19 | 20 | RedstoneControlHelper.setControl(container, ControlMode.LOW); 21 | container.getTagCompound().setInteger("Frequency", -1); 22 | container.getTagCompound().setByte("ModeItems", (byte) 1); 23 | container.getTagCompound().setByte("ModeFluid", (byte) 1); 24 | container.getTagCompound().setByte("ModeEnergy", (byte) 1); 25 | 26 | return container; 27 | } 28 | 29 | public ItemBlockEnder(Block block) { 30 | 31 | super(block); 32 | setHasSubtypes(true); 33 | setMaxDamage(0); 34 | setMaxStackSize(1); 35 | setNoRepair(); 36 | } 37 | 38 | @Override 39 | public String getUnlocalizedName(ItemStack stack) { 40 | 41 | return "tile.thermalexpansion.ender.tesseract.name"; 42 | } 43 | 44 | @Override 45 | public EnumRarity getRarity(ItemStack stack) { 46 | 47 | return EnumRarity.RARE; 48 | } 49 | 50 | @Override 51 | public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean check) { 52 | 53 | if (stack.getTagCompound() == null) { 54 | setDefaultTag(stack); 55 | } 56 | SecurityHelper.addOwnerInformation(stack, list); 57 | 58 | if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) { 59 | list.add(StringHelper.shiftForDetails()); 60 | } 61 | if (!StringHelper.isShiftKeyDown()) { 62 | return; 63 | } 64 | SecurityHelper.addAccessInformation(stack, list); 65 | 66 | list.add(StringHelper.getInfoText("info.thermalexpansion.ender.tesseract.0")); 67 | list.add(StringHelper.getInfoText("info.thermalexpansion.ender.tesseract.1")); 68 | 69 | if (stack.getTagCompound() != null && stack.getTagCompound().hasKey("Frequency")) { 70 | int frequency = stack.getTagCompound().getInteger("Frequency"); 71 | byte modeItem = stack.getTagCompound().getByte("ModeItems"); 72 | byte modeFluid = stack.getTagCompound().getByte("ModeFluid"); 73 | byte modeEnergy = stack.getTagCompound().getByte("ModeEnergy"); 74 | 75 | if (frequency < 0) { 76 | list.add(StringHelper.localize("info.cofh.frequency") + ": " + StringHelper.localize("info.cofh.none")); 77 | } else { 78 | list.add(StringHelper.localize("info.cofh.frequency") + ": " + frequency); 79 | } 80 | list.add(StringHelper.localize("info.cofh.items") + ": " + MODES[modeItem]); 81 | list.add(StringHelper.localize("info.cofh.fluid") + ": " + MODES[modeFluid]); 82 | list.add(StringHelper.localize("info.cofh.energy") + ": " + MODES[modeEnergy]); 83 | } 84 | RedstoneControlHelper.addRSControlInformation(stack, list); 85 | } 86 | 87 | public static final String[] MODES = { StringHelper.localize("info.thermalexpansion.modeSend"), StringHelper.localize("info.thermalexpansion.modeRecv"), 88 | StringHelper.localize("info.thermalexpansion.modeSendRecv"), StringHelper.localize("info.thermalexpansion.modeBlocked") }; 89 | 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermaldynamics/plugins/TDPlugins.java: -------------------------------------------------------------------------------- 1 | package cofh.thermaldynamics.plugins; 2 | 3 | import cofh.core.CoFHProps; 4 | import cofh.thermaldynamics.ThermalDynamics; 5 | 6 | import java.util.ArrayList; 7 | 8 | public class TDPlugins { 9 | 10 | static class Plugin { 11 | 12 | public Class pluginClass = null; 13 | public String pluginPath; 14 | 15 | public Plugin(String pluginPath) { 16 | 17 | this.pluginPath = TDPlugins.class.getName().replace("TDPlugins", "") + pluginPath; 18 | } 19 | 20 | public void preInit() { 21 | 22 | try { 23 | pluginClass = TDPlugins.class.getClassLoader().loadClass(pluginPath); 24 | pluginClass.getMethod("preInit", new Class[0]).invoke(null); 25 | } catch (Throwable t) { 26 | if (CoFHProps.enableDebugOutput) { 27 | t.printStackTrace(); 28 | } 29 | } 30 | } 31 | 32 | public void initialize() { 33 | 34 | try { 35 | if (pluginClass != null) { 36 | pluginClass.getMethod("initialize", new Class[0]).invoke(null); 37 | } 38 | } catch (Throwable t) { 39 | if (CoFHProps.enableDebugOutput) { 40 | t.printStackTrace(); 41 | } 42 | } 43 | } 44 | 45 | public void postInit() { 46 | 47 | try { 48 | if (pluginClass != null) { 49 | pluginClass.getMethod("postInit", new Class[0]).invoke(null); 50 | } 51 | } catch (Throwable t) { 52 | if (CoFHProps.enableDebugOutput) { 53 | t.printStackTrace(); 54 | } 55 | } 56 | } 57 | 58 | public void loadComplete() { 59 | 60 | try { 61 | if (pluginClass != null) { 62 | pluginClass.getMethod("loadComplete", new Class[0]).invoke(null); 63 | } 64 | } catch (Throwable t) { 65 | if (CoFHProps.enableDebugOutput) { 66 | t.printStackTrace(); 67 | } 68 | } 69 | } 70 | 71 | public void registerRenderInformation() { 72 | 73 | try { 74 | if (pluginClass != null) { 75 | pluginClass.getMethod("registerRenderInformation", new Class[0]).invoke(null); 76 | } 77 | } catch (Throwable t) { 78 | if (CoFHProps.enableDebugOutput) { 79 | t.printStackTrace(); 80 | } 81 | } 82 | } 83 | } 84 | 85 | public static ArrayList pluginList = new ArrayList(); 86 | 87 | static { 88 | addPlugin("thaumcraft.ThaumcraftPlugin", "Thaumcraft"); 89 | } 90 | 91 | public static void preInit() { 92 | 93 | ThermalDynamics.log.info("Loading Plugins..."); 94 | for (int i = 0; i < pluginList.size(); i++) { 95 | pluginList.get(i).preInit(); 96 | } 97 | ThermalDynamics.log.info("Finished Loading Plugins."); 98 | } 99 | 100 | public static void initialize() { 101 | 102 | for (int i = 0; i < pluginList.size(); i++) { 103 | pluginList.get(i).initialize(); 104 | } 105 | } 106 | 107 | public static void postInit() { 108 | 109 | for (int i = 0; i < pluginList.size(); i++) { 110 | pluginList.get(i).postInit(); 111 | } 112 | } 113 | 114 | public static void loadComplete() { 115 | 116 | for (int i = 0; i < pluginList.size(); i++) { 117 | pluginList.get(i).loadComplete(); 118 | } 119 | } 120 | 121 | public static void cleanUp() { 122 | 123 | pluginList.clear(); 124 | } 125 | 126 | public static boolean addPlugin(String pluginPath, String pluginName) { 127 | 128 | boolean enable = ThermalDynamics.config.get("Plugins." + pluginName, "Enable", true); 129 | ThermalDynamics.config.save(); 130 | 131 | if (enable) { 132 | pluginList.add(new Plugin(pluginPath)); 133 | return true; 134 | } 135 | return false; 136 | } 137 | 138 | } 139 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermaldynamics/debughelper/PacketMultiTileInfo.java: -------------------------------------------------------------------------------- 1 | package cofh.thermaldynamics.debughelper; 2 | 3 | import cofh.core.network.ITileInfoPacketHandler; 4 | import cofh.core.network.PacketCoFHBase; 5 | import cofh.core.network.PacketTileInfo; 6 | import cofh.lib.util.BlockPosition; 7 | import cofh.lib.util.ChunkCoord; 8 | import cofh.thermaldynamics.multiblock.IMultiBlock; 9 | import io.netty.buffer.ByteBuf; 10 | import io.netty.channel.ChannelHandlerContext; 11 | import net.minecraft.entity.player.EntityPlayer; 12 | import net.minecraft.world.chunk.Chunk; 13 | 14 | import java.io.ByteArrayInputStream; 15 | import java.io.DataInputStream; 16 | import java.io.IOException; 17 | import java.util.*; 18 | 19 | public class PacketMultiTileInfo extends PacketCoFHBase { 20 | 21 | public ByteArrayInputStream stream; 22 | public byte[] data; 23 | 24 | public static HashMap> buildList(Collection tiles) { 25 | 26 | HashMap> map = new HashMap>(); 27 | for (IMultiBlock tile : tiles) { 28 | BlockPosition e = new BlockPosition(tile.x(), tile.y(), tile.z()); 29 | ChunkCoord key = new ChunkCoord(e); 30 | 31 | List blockPositions = map.get(key); 32 | if (blockPositions == null) { 33 | blockPositions = new LinkedList(); 34 | map.put(key, blockPositions); 35 | } 36 | 37 | blockPositions.add(e); 38 | } 39 | return map; 40 | } 41 | 42 | public PacketMultiTileInfo() { 43 | 44 | super(); 45 | } 46 | 47 | public PacketMultiTileInfo(HashMap> map) { 48 | 49 | addInt(map.entrySet().size()); 50 | for (Map.Entry> entry : map.entrySet()) { 51 | addInt(entry.getKey().chunkX); 52 | addInt(entry.getKey().chunkZ); 53 | addShort(entry.getValue().size()); 54 | for (BlockPosition pos : entry.getValue()) { 55 | addByte((pos.x & 15) << 4 | (pos.z & 15)); 56 | addByte(pos.y); 57 | } 58 | } 59 | } 60 | 61 | @Override 62 | public void handlePacket(EntityPlayer player, boolean isServer) { 63 | 64 | int n, n2, xz; 65 | Chunk chunk; 66 | 67 | n = getInt(); 68 | ArrayList tiles = new ArrayList(); 69 | for (int i = 0; i < n; i++) { 70 | chunk = player.worldObj.getChunkFromChunkCoords(getInt(), getInt()); 71 | 72 | n2 = getShort(); 73 | for (int j = 0; j < n2; j++) { 74 | xz = getByte(); 75 | getInt();//TODO << Dummy getInt to prevent any issues with packets. 76 | //TileEntity tile = chunk.getTileEntity(xz >> 4, getInt(), xz & 15); 77 | //if (tile instanceof ITileInfoPacketHandler) { 78 | // tiles.add(((ITileInfoPacketHandler) tile)); 79 | //} 80 | } 81 | } 82 | 83 | byte[] tilePacket = new byte[stream.available()]; 84 | 85 | assert stream.read(tilePacket, 0, tilePacket.length) == tilePacket.length; 86 | 87 | PacketTileInfo packetTileInfo = new PacketTileInfo(); 88 | for (ITileInfoPacketHandler tile : tiles) { 89 | packetTileInfo.datain = new DataInputStream(new ByteArrayInputStream(tilePacket)); 90 | tile.handleTileInfoPacket(packetTileInfo, isServer, player); 91 | } 92 | 93 | } 94 | 95 | @Override 96 | public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) { 97 | 98 | datain = new DataInputStream(stream = new ByteArrayInputStream(buffer.array())); 99 | try { 100 | datain.skipBytes(1); 101 | } catch (IOException e) { 102 | e.printStackTrace(); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/block/tank/TileTankCreative.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.block.tank; 2 | 3 | import net.minecraft.util.EnumFacing; 4 | import net.minecraftforge.common.capabilities.Capability; 5 | import net.minecraftforge.fluids.Fluid; 6 | import net.minecraftforge.fluids.FluidContainerRegistry; 7 | import net.minecraftforge.fluids.FluidStack; 8 | import net.minecraftforge.fluids.FluidTankInfo; 9 | import net.minecraftforge.fluids.capability.CapabilityFluidHandler; 10 | import net.minecraftforge.fluids.capability.FluidTankProperties; 11 | import net.minecraftforge.fluids.capability.IFluidHandler; 12 | import net.minecraftforge.fluids.capability.IFluidTankProperties; 13 | import net.minecraftforge.fml.common.registry.GameRegistry; 14 | import net.minecraftforge.fml.relauncher.Side; 15 | 16 | import javax.annotation.Nullable; 17 | 18 | public class TileTankCreative extends TileTank { 19 | 20 | public static void initialize() { 21 | 22 | GameRegistry.registerTileEntity(TileTankCreative.class, "thermalexpansion.TankCreative"); 23 | } 24 | 25 | public TileTankCreative() { 26 | 27 | } 28 | 29 | public TileTankCreative(int metadata) { 30 | 31 | super(metadata); 32 | } 33 | 34 | @Override 35 | protected void transferFluid() { 36 | 37 | if (tank.getFluidAmount() <= 0 || adjacentHandlers[0] == null) { 38 | return; 39 | } 40 | adjacentHandlers[0].fill(new FluidStack(tank.getFluid(), Fluid.BUCKET_VOLUME * 64), true); 41 | } 42 | 43 | @Override 44 | public T getCapability(Capability capability, final EnumFacing facing) { 45 | 46 | if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { 47 | return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(new IFluidHandler() { 48 | @Override 49 | public IFluidTankProperties[] getTankProperties() { 50 | 51 | return FluidTankProperties.convert(new FluidTankInfo[] { tank.getInfo() }); 52 | } 53 | 54 | @Override 55 | public int fill(FluidStack resource, boolean doFill) { 56 | 57 | int ordinal = facing == null ? 6 : facing.ordinal(); 58 | 59 | if (ordinal == 0 && mode == 1) { 60 | return 0; 61 | } 62 | if (ordinal > 1 && ordinal < 6) { 63 | return 0; 64 | } 65 | if (resource == null || resource.getFluid() == null || resource.isFluidEqual(tank.getFluid())) { 66 | return 0; 67 | } 68 | tank.setFluid(new FluidStack(resource.getFluid(), FluidContainerRegistry.BUCKET_VOLUME)); 69 | sendUpdatePacket(Side.CLIENT); 70 | updateRender(); 71 | return 0; 72 | } 73 | 74 | @Nullable 75 | @Override 76 | public FluidStack drain(FluidStack resource, boolean doDrain) { 77 | 78 | int ordinal = facing == null ? 6 : facing.ordinal(); 79 | 80 | if (ordinal == 0 && mode == 1) { 81 | return null; 82 | } 83 | if (ordinal > 1 && ordinal < 6) { 84 | return null; 85 | } 86 | if (resource == null || !resource.isFluidEqual(tank.getFluid())) { 87 | return null; 88 | } 89 | return resource.copy(); 90 | } 91 | 92 | @Nullable 93 | @Override 94 | public FluidStack drain(int maxDrain, boolean doDrain) { 95 | 96 | int ordinal = facing == null ? 6 : facing.ordinal(); 97 | 98 | if (ordinal == 0 && mode == 1) { 99 | return null; 100 | } 101 | if (ordinal > 1 && ordinal < 6) { 102 | return null; 103 | } 104 | if (tank.getFluid() == null) { 105 | return null; 106 | } 107 | return new FluidStack(tank.getFluid(), maxDrain); 108 | } 109 | }); 110 | } 111 | return super.getCapability(capability, facing); 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/mfr/MFRPlugin.java: -------------------------------------------------------------------------------- 1 | //package cofh.thermalfoundation.plugins.mfr; 2 | // 3 | //import cofh.asm.relauncher.Strippable; 4 | //import cofh.lib.util.helpers.MathHelper; 5 | //import cofh.thermalfoundation.ThermalFoundation; 6 | // 7 | //import powercrystals.minefactoryreloaded.api.FactoryRegistry; 8 | //import powercrystals.minefactoryreloaded.api.ValuedItem; 9 | // 10 | //public class MFRPlugin { 11 | // 12 | // public static void preInit() { 13 | // 14 | // String comment; 15 | // String category = "Plugins.MineFactoryReloaded.Straw"; 16 | // 17 | // strawRedstone = ThermalFoundation.config.get(category, "Redstone", true); 18 | // strawGlowstone = ThermalFoundation.config.get(category, "Glowstone", true); 19 | // strawEnder = ThermalFoundation.config.get(category, "Ender", true); 20 | // strawPyrotheum = ThermalFoundation.config.get(category, "Pyrotheum", true); 21 | // strawCryotheum = ThermalFoundation.config.get(category, "Cryotheum", true); 22 | // strawAerotheum = ThermalFoundation.config.get(category, "Aerotheum", true); 23 | // strawPetrotheum = ThermalFoundation.config.get(category, "Petrotheum", true); 24 | // strawCoal = ThermalFoundation.config.get(category, "Coal", true); 25 | // 26 | // comment = "This controls the maximum distance (in blocks) a player will teleport from drinking Ender. (Min: 8, Max: 65536)"; 27 | // strawEnderRange = ThermalFoundation.config.get(category, "Ender.Range", strawEnderRange, comment); 28 | // strawEnderRange = MathHelper.clamp(strawEnderRange, 8, 65536); 29 | // } 30 | // 31 | // public static void initialize() { 32 | // 33 | // } 34 | // 35 | // @Strippable("mod:MineFactoryReloaded") 36 | // public static void postInit() { 37 | // 38 | // if (strawRedstone) { 39 | // FactoryRegistry.sendMessage("registerLiquidDrinkHandler", new ValuedItem("redstone", DrinkHandlerRedstone.instance)); 40 | // } 41 | // if (strawGlowstone) { 42 | // FactoryRegistry.sendMessage("registerLiquidDrinkHandler", new ValuedItem("glowstone", DrinkHandlerGlowstone.instance)); 43 | // } 44 | // if (strawEnder) { 45 | // FactoryRegistry.sendMessage("registerLiquidDrinkHandler", new ValuedItem("ender", DrinkHandlerEnder.instance)); 46 | // } 47 | // if (strawPyrotheum) { 48 | // FactoryRegistry.sendMessage("registerLiquidDrinkHandler", new ValuedItem("pyrotheum", DrinkHandlerPyrotheum.instance)); 49 | // } 50 | // if (strawCryotheum) { 51 | // FactoryRegistry.sendMessage("registerLiquidDrinkHandler", new ValuedItem("cryotheum", DrinkHandlerCryotheum.instance)); 52 | // } 53 | // if (strawAerotheum) { 54 | // FactoryRegistry.sendMessage("registerLiquidDrinkHandler", new ValuedItem("aerotheum", DrinkHandlerAerotheum.instance)); 55 | // } 56 | // if (strawPetrotheum) { 57 | // FactoryRegistry.sendMessage("registerLiquidDrinkHandler", new ValuedItem("petrotheum", DrinkHandlerPetrotheum.instance)); 58 | // } 59 | // if (strawCoal) { 60 | // FactoryRegistry.sendMessage("registerLiquidDrinkHandler", new ValuedItem("coal", DrinkHandlerCoal.instance)); 61 | // } 62 | // } 63 | // 64 | // @Strippable("mod:MineFactoryReloaded") 65 | // public static void loadComplete() { 66 | // 67 | // ThermalFoundation.log.info("Thermal Foundation: MineFactoryReloaded Plugin Enabled."); 68 | // } 69 | // 70 | // public static boolean strawRedstone = true; 71 | // public static boolean strawGlowstone = true; 72 | // public static boolean strawEnder = true; 73 | // public static boolean strawPyrotheum = true; 74 | // public static boolean strawCryotheum = true; 75 | // public static boolean strawAerotheum = true; 76 | // public static boolean strawPetrotheum = true; 77 | // public static boolean strawCoal = true; 78 | // 79 | // public static int strawEnderRange = 16384; 80 | // 81 | //} 82 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermaldynamics/plugins/nei/RecipeHandlerCover.java: -------------------------------------------------------------------------------- 1 | package cofh.thermaldynamics.plugins.nei; 2 | 3 | import codechicken.nei.api.stack.PositionedStack; 4 | import codechicken.nei.recipe.ShapelessRecipeHandler; 5 | import codechicken.nei.widget.ItemPanel; 6 | import cofh.lib.util.helpers.ItemHelper; 7 | import cofh.lib.util.helpers.StringHelper; 8 | import cofh.thermaldynamics.ThermalDynamics; 9 | import cofh.thermaldynamics.duct.TDDucts; 10 | import cofh.thermaldynamics.duct.attachments.cover.CoverHelper; 11 | 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | import net.minecraft.block.Block; 16 | import net.minecraft.init.Blocks; 17 | import net.minecraft.item.ItemStack; 18 | import net.minecraft.nbt.NBTTagCompound; 19 | 20 | public class RecipeHandlerCover extends ShapelessRecipeHandler { 21 | 22 | public static RecipeHandlerCover instance = new RecipeHandlerCover(); 23 | 24 | public class CachedCoverRecipeSimple extends CachedShapelessRecipe { 25 | 26 | public CachedCoverRecipeSimple(ItemStack block) { 27 | 28 | super(new Object[] { block, TDDucts.structure.itemStack }, ItemHelper.cloneStack(CoverHelper.getCoverStack(block), 6)); 29 | } 30 | } 31 | 32 | public class CachedCoverRecipeAll extends CachedShapelessRecipe { 33 | 34 | @SuppressWarnings("unchecked") 35 | public CachedCoverRecipeAll() { 36 | 37 | List items = new ArrayList(); 38 | for (ItemStack item : ItemPanel.items) { 39 | if (CoverHelper.isValid(item)) { 40 | items.add(item); 41 | } 42 | } 43 | 44 | ArrayList objects = new ArrayList(); 45 | objects.add(items); 46 | objects.add(TDDucts.structure.itemStack); 47 | setIngredients(objects); 48 | } 49 | 50 | @Override 51 | public PositionedStack getResult() { 52 | 53 | for (PositionedStack positionedStack : ingredients) { 54 | ItemStack item = positionedStack.item; 55 | if (item != TDDucts.structure.itemStack) { 56 | if (CoverHelper.isValid(item)) { 57 | setResult(ItemHelper.cloneStack(CoverHelper.getCoverStack(item), 6)); 58 | return super.getResult(); 59 | } 60 | } 61 | } 62 | return null; 63 | } 64 | } 65 | 66 | @Override 67 | public void loadCraftingRecipes(ItemStack result) { 68 | 69 | if (result.getItem() != ThermalDynamics.itemCover) { 70 | return; 71 | } 72 | 73 | NBTTagCompound nbt = result.getTagCompound(); 74 | if (nbt == null || !nbt.hasKey("Meta", 1) || !nbt.hasKey("Block", 8)) { 75 | return; 76 | } 77 | 78 | int meta = nbt.getByte("Meta"); 79 | Block block = Block.getBlockFromName(nbt.getString("Block")); 80 | 81 | if (block == Blocks.AIR || meta < 0 || meta >= 16 || !CoverHelper.isValid(block, meta)) { 82 | return; 83 | } 84 | arecipes.add(new CachedCoverRecipeSimple(new ItemStack(block, 1, meta))); 85 | } 86 | 87 | @Override 88 | public void loadCraftingRecipes(String outputId, Object... results) { 89 | 90 | if (outputId.equals("crafting")) { 91 | arecipes.add(new CachedCoverRecipeAll()); 92 | } else { 93 | super.loadCraftingRecipes(outputId, results); 94 | } 95 | } 96 | 97 | @Override 98 | public void loadUsageRecipes(ItemStack ingredient) { 99 | 100 | if (CoverHelper.isValid(ingredient)) { 101 | arecipes.add(new CachedCoverRecipeSimple(ingredient)); 102 | } else if (ItemHelper.itemsEqualForCrafting(TDDucts.structure.itemStack, ingredient)) { 103 | arecipes.add(new CachedCoverRecipeAll()); 104 | } 105 | } 106 | 107 | @Override 108 | public String getRecipeName() { 109 | 110 | return StringHelper.localize("recipe.thermaldynamics.covers"); 111 | } 112 | 113 | @Override 114 | public boolean isRecipe2x2(int recipe) { 115 | 116 | return true; 117 | } 118 | 119 | } 120 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalexpansion/plugins/nei/handlers/RecipeHandlerCharger.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalexpansion.plugins.nei.handlers; 2 | 3 | import static codechicken.lib.gui.GuiDraw.*; 4 | 5 | import codechicken.nei.api.stack.PositionedStack; 6 | import codechicken.nei.util.NEIServerUtils; 7 | import cofh.thermalexpansion.gui.client.machine.GuiCharger; 8 | import cofh.thermalexpansion.util.crafting.ChargerManager; 9 | import cofh.thermalexpansion.util.crafting.ChargerManager.RecipeCharger; 10 | 11 | import net.minecraft.item.ItemStack; 12 | 13 | public class RecipeHandlerCharger extends RecipeHandlerBase { 14 | 15 | public static RecipeHandlerCharger instance = new RecipeHandlerCharger(); 16 | 17 | public RecipeHandlerCharger() { 18 | 19 | super(); 20 | this.maxEnergy = 400 * 1000; 21 | } 22 | 23 | @Override 24 | public void initialize() { 25 | 26 | this.trCoords = new int[] { 79, 43, 18, 16 }; 27 | this.recipeName = "charger"; 28 | this.containerClass = GuiCharger.class; 29 | } 30 | 31 | @Override 32 | public void drawBackgroundExtras(int recipe) { 33 | 34 | drawTexturedModalRect(79, 24, 132, 96, 18, 18); 35 | drawTexturedModalRect(116, 20, 150, 96, 26, 26); 36 | 37 | drawTexturedModalRect(79, 44, 224, 80, 16, 16); 38 | drawProgressBar(79, 44, 240, 80, 16, 16, 20, 7); 39 | } 40 | 41 | @Override 42 | public void drawExtras(int recipe) { 43 | 44 | drawEnergy(recipe); 45 | 46 | int energy = ((NEIRecipeBase) arecipes.get(recipe)).energy; 47 | 48 | if (energy < 1000) { 49 | drawString(energy + "RF", 44, 48, 0x939393, false); 50 | } else if (energy < 10000) { 51 | drawString(energy + "RF", 38, 48, 0x939393, false); 52 | } else if (energy < 100000) { 53 | drawString(energy + "RF", 32, 48, 0x939393, false); 54 | } else { 55 | drawString(energy + "RF", 26, 48, 0x939393, false); 56 | } 57 | } 58 | 59 | @SuppressWarnings("unchecked") 60 | @Override 61 | public void loadCraftingRecipes(String outputId, Object... results) { 62 | 63 | if (outputId.equals(getOverlayIdentifier())) { 64 | RecipeCharger[] recipes = ChargerManager.getRecipeList(); 65 | for (RecipeCharger recipe : recipes) { 66 | arecipes.add(new NEIRecipeCharger(recipe)); 67 | } 68 | } else { 69 | super.loadCraftingRecipes(outputId, results); 70 | } 71 | } 72 | 73 | @SuppressWarnings("unchecked") 74 | @Override 75 | public void loadCraftingRecipes(ItemStack result) { 76 | 77 | RecipeCharger[] recipes = ChargerManager.getRecipeList(); 78 | for (ChargerManager.RecipeCharger recipe : recipes) { 79 | if (NEIServerUtils.areStacksSameType(recipe.getOutput(), result)) { 80 | arecipes.add(new NEIRecipeCharger(recipe)); 81 | } 82 | } 83 | } 84 | 85 | @Override 86 | public void loadUsageRecipes(String inputId, Object... ingredients) { 87 | 88 | if (inputId.equals("fuel") && getClass() == RecipeHandlerCharger.class) { 89 | loadCraftingRecipes(getOverlayIdentifier()); 90 | } else { 91 | super.loadUsageRecipes(inputId, ingredients); 92 | } 93 | } 94 | 95 | @SuppressWarnings("unchecked") 96 | @Override 97 | public void loadUsageRecipes(ItemStack ingredient) { 98 | 99 | RecipeCharger[] recipes = ChargerManager.getRecipeList(); 100 | for (RecipeCharger recipe : recipes) { 101 | if (NEIServerUtils.areStacksSameType(recipe.getInput(), ingredient)) { 102 | arecipes.add(new NEIRecipeCharger(recipe)); 103 | } 104 | } 105 | } 106 | 107 | /* RECIPE CLASS */ 108 | class NEIRecipeCharger extends NEIRecipeBase { 109 | 110 | public NEIRecipeCharger(RecipeCharger recipe) { 111 | 112 | input = new PositionedStack(recipe.getInput(), 80, 25); 113 | output = new PositionedStack(recipe.getOutput(), 121, 25); 114 | energy = recipe.getEnergy(); 115 | 116 | setOres(); 117 | } 118 | } 119 | 120 | } 121 | -------------------------------------------------------------------------------- /src/main/java/cofh/thermalfoundation/plugins/TFPlugins.java: -------------------------------------------------------------------------------- 1 | package cofh.thermalfoundation.plugins; 2 | 3 | import cofh.thermalfoundation.ThermalFoundation; 4 | 5 | import java.util.ArrayList; 6 | 7 | public class TFPlugins { 8 | 9 | static class Plugin { 10 | 11 | public Class pluginClass = null; 12 | public String pluginPath; 13 | public static boolean enableDebugOutput = false; 14 | 15 | public Plugin(String pluginPath) { 16 | 17 | this.pluginPath = "cofh.thermalfoundation.plugins." + pluginPath; 18 | } 19 | 20 | public void preInit() { 21 | 22 | try { 23 | pluginClass = TFPlugins.class.getClassLoader().loadClass(pluginPath); 24 | pluginClass.getMethod("preInit", new Class[0]).invoke(null, new Object[0]); 25 | } catch (Throwable t) { 26 | if (enableDebugOutput) { 27 | t.printStackTrace(); 28 | } 29 | } 30 | } 31 | 32 | public void initialize() { 33 | 34 | try { 35 | if (pluginClass != null) { 36 | pluginClass.getMethod("initialize", new Class[0]).invoke(null, new Object[0]); 37 | } 38 | } catch (Throwable t) { 39 | if (enableDebugOutput) { 40 | t.printStackTrace(); 41 | } 42 | } 43 | } 44 | 45 | public void postInit() { 46 | 47 | try { 48 | if (pluginClass != null) { 49 | pluginClass.getMethod("postInit", new Class[0]).invoke(null, new Object[0]); 50 | } 51 | } catch (Throwable t) { 52 | if (enableDebugOutput) { 53 | t.printStackTrace(); 54 | } 55 | } 56 | } 57 | 58 | public void loadComplete() { 59 | 60 | try { 61 | if (pluginClass != null) { 62 | pluginClass.getMethod("loadComplete", new Class[0]).invoke(null, new Object[0]); 63 | } 64 | } catch (Throwable t) { 65 | if (enableDebugOutput) { 66 | t.printStackTrace(); 67 | } 68 | } 69 | } 70 | 71 | public void registerRenderInformation() { 72 | 73 | try { 74 | if (pluginClass != null) { 75 | pluginClass.getMethod("registerRenderInformation", new Class[0]).invoke(null, new Object[0]); 76 | } 77 | } catch (Throwable t) { 78 | if (enableDebugOutput) { 79 | t.printStackTrace(); 80 | } 81 | } 82 | } 83 | } 84 | 85 | public static ArrayList pluginList = new ArrayList(); 86 | 87 | static { 88 | //addPlugin("mfr.MFRPlugin", "MineFactoryReloaded"); 89 | //addPlugin("thaumcraft.ThaumcraftPlugin", "Thaumcraft"); 90 | //addPlugin("tconstruct.TConstructPlugin", "TConstruct"); 91 | //addPlugin("ee3.EE3Plugin", "EE3"); 92 | } 93 | 94 | public static void preInit() { 95 | 96 | ThermalFoundation.log.info("Thermal Foundation: Loading Plugins..."); 97 | for (int i = 0; i < pluginList.size(); i++) { 98 | pluginList.get(i).preInit(); 99 | } 100 | ThermalFoundation.log.info("Thermal Foundation: Finished Loading Plugins."); 101 | } 102 | 103 | public static void initialize() { 104 | 105 | for (int i = 0; i < pluginList.size(); i++) { 106 | pluginList.get(i).initialize(); 107 | } 108 | } 109 | 110 | public static void postInit() { 111 | 112 | for (int i = 0; i < pluginList.size(); i++) { 113 | pluginList.get(i).postInit(); 114 | } 115 | } 116 | 117 | public static void loadComplete() { 118 | 119 | for (int i = 0; i < pluginList.size(); i++) { 120 | pluginList.get(i).loadComplete(); 121 | } 122 | } 123 | 124 | public static void cleanUp() { 125 | 126 | pluginList.clear(); 127 | } 128 | 129 | public static boolean addPlugin(String pluginPath, String pluginName) { 130 | 131 | boolean enable = ThermalFoundation.config.get("Plugins." + pluginName, "Enable", true).getBoolean(); 132 | ThermalFoundation.config.save(); 133 | 134 | if (enable) { 135 | pluginList.add(new Plugin(pluginPath)); 136 | return true; 137 | } 138 | return false; 139 | } 140 | 141 | } 142 | --------------------------------------------------------------------------------