├── src └── main │ ├── resources │ ├── assets │ │ └── chemica │ │ │ ├── models │ │ │ ├── item │ │ │ │ ├── bauxite.json │ │ │ │ ├── crusher.json │ │ │ │ ├── basic_wire.json │ │ │ │ ├── coke_block.json │ │ │ │ ├── energy_box.json │ │ │ │ ├── cuprite_ore.json │ │ │ │ ├── galena_ore.json │ │ │ │ ├── pyrite_ore.json │ │ │ │ ├── rutile_ore.json │ │ │ │ ├── silver_ore.json │ │ │ │ ├── zincite_ore.json │ │ │ │ ├── argentite_ore.json │ │ │ │ ├── fireproof_bricks.json │ │ │ │ ├── malachite_ore.json │ │ │ │ ├── sandstone_bricks.json │ │ │ │ ├── cassiterite_ore.json │ │ │ │ ├── chalcopyrite_ore.json │ │ │ │ ├── sphalerite_ore.json │ │ │ │ ├── beehive_oven_control.json │ │ │ │ ├── fireproof_brick_slab.json │ │ │ │ ├── sandstone_brick_slab.json │ │ │ │ ├── solid_fuel_generator.json │ │ │ │ ├── stone_alloy_smelter.json │ │ │ │ ├── fireproof_brick_stairs.json │ │ │ │ ├── sandstone_brick_stairs.json │ │ │ │ ├── fireproof_brick_wall.json │ │ │ │ ├── sandstone_brick_wall.json │ │ │ │ ├── tester.json │ │ │ │ ├── coke.json │ │ │ │ ├── battery.json │ │ │ │ ├── screwdriver.json │ │ │ │ ├── tin_ingot.json │ │ │ │ ├── bronze_ingot.json │ │ │ │ ├── copper_ingot.json │ │ │ │ ├── lead_ingot.json │ │ │ │ ├── silver_ingot.json │ │ │ │ ├── steel_ingot.json │ │ │ │ ├── wooden_gear.json │ │ │ │ ├── zinc_ingot.json │ │ │ │ ├── aluminum_ingot.json │ │ │ │ ├── coal_ore_dust.json │ │ │ │ ├── gold_ore_dust.json │ │ │ │ ├── iron_ore_dust.json │ │ │ │ ├── magnesium_ingot.json │ │ │ │ ├── galena_ore_dust.json │ │ │ │ ├── pyrite_ore_dust.json │ │ │ │ ├── rutile_ore_dust.json │ │ │ │ ├── silver_ore_dust.json │ │ │ │ ├── argentite_ore_dust.json │ │ │ │ ├── cuprite_ore_dust.json │ │ │ │ ├── diamond_ore_dust.json │ │ │ │ ├── malachite_ore_dust.json │ │ │ │ ├── redstone_ore_dust.json │ │ │ │ ├── zincite_ore_dust.json │ │ │ │ ├── cassiterite_ore_dust.json │ │ │ │ ├── sphalerite_ore_dust.json │ │ │ │ ├── chalcopyrite_ore_dust.json │ │ │ │ └── crank.json │ │ │ └── block │ │ │ │ ├── fireproof_bricks.json │ │ │ │ ├── fireproof_brick_wall_inventory.json │ │ │ │ ├── fireproof_brick_wall_post.json │ │ │ │ ├── fireproof_brick_wall_side.json │ │ │ │ ├── sandstone_brick_wall_inventory.json │ │ │ │ ├── sandstone_brick_wall_post.json │ │ │ │ ├── sandstone_brick_wall_side.json │ │ │ │ ├── fireproof_brick_slab.json │ │ │ │ ├── sandstone_brick_slab.json │ │ │ │ ├── fireproof_brick_stairs.json │ │ │ │ ├── sandstone_brick_stairs.json │ │ │ │ ├── fireproof_brick_slab_top.json │ │ │ │ ├── sandstone_brick_slab_top.json │ │ │ │ ├── fireproof_brick_stairs_inner.json │ │ │ │ ├── fireproof_brick_stairs_outer.json │ │ │ │ ├── sandstone_brick_stairs_inner.json │ │ │ │ ├── sandstone_brick_stairs_outer.json │ │ │ │ ├── stone_alloy_smelter.json │ │ │ │ ├── crusher.json │ │ │ │ ├── solid_fuel_generator.json │ │ │ │ ├── beehive_oven_control.json │ │ │ │ ├── solid_fuel_generator_burning.json │ │ │ │ ├── stone_alloy_smelter_burning.json │ │ │ │ ├── beehive_oven_control_on.json │ │ │ │ ├── bauxite.json │ │ │ │ ├── coke_block.json │ │ │ │ ├── ores │ │ │ │ ├── galena_ore.json │ │ │ │ ├── pyrite_ore.json │ │ │ │ ├── rutile_ore.json │ │ │ │ ├── silver_ore.json │ │ │ │ ├── cuprite_ore.json │ │ │ │ ├── zincite_ore.json │ │ │ │ ├── argentite_ore.json │ │ │ │ ├── malachite_ore.json │ │ │ │ ├── sphalerite_ore.json │ │ │ │ ├── cassiterite_ore.json │ │ │ │ └── chalcopyrite_ore.json │ │ │ │ ├── sandstone_bricks.json │ │ │ │ ├── energy_box.json │ │ │ │ ├── conduit_side.json │ │ │ │ ├── conduit_center.json │ │ │ │ ├── conduit.json │ │ │ │ └── crank.json │ │ │ ├── icon.png │ │ │ ├── blockstates │ │ │ ├── bauxite.json │ │ │ ├── coke_block.json │ │ │ ├── energy_box.json │ │ │ ├── galena_ore.json │ │ │ ├── pyrite_ore.json │ │ │ ├── rutile_ore.json │ │ │ ├── silver_ore.json │ │ │ ├── cuprite_ore.json │ │ │ ├── zincite_ore.json │ │ │ ├── argentite_ore.json │ │ │ ├── cassiterite_ore.json │ │ │ ├── malachite_ore.json │ │ │ ├── sandstone_bricks.json │ │ │ ├── sphalerite_ore.json │ │ │ ├── chalcopyrite_ore.json │ │ │ ├── fireproof_bricks.json │ │ │ ├── fireproof_brick_slab.json │ │ │ ├── sandstone_brick_slab.json │ │ │ ├── crusher.json │ │ │ ├── crank.json │ │ │ ├── fireproof_brick_wall.json │ │ │ ├── sandstone_brick_wall.json │ │ │ ├── stone_alloy_smelter.json │ │ │ ├── solid_fuel_generator.json │ │ │ ├── beehive_oven_control.json │ │ │ └── basic_wire.json │ │ │ ├── textures │ │ │ ├── fluids │ │ │ │ ├── redstone_flow.png.mcmeta │ │ │ │ ├── energy.png │ │ │ │ ├── energyfluid.png │ │ │ │ ├── redstone_flow.png │ │ │ │ └── redstone_still.png │ │ │ ├── gui │ │ │ │ ├── toggle.png │ │ │ │ ├── fire_bar.png │ │ │ │ ├── energybar.png │ │ │ │ ├── fire_bar_bg.png │ │ │ │ ├── fire_bar_fg.png │ │ │ │ ├── generator.png │ │ │ │ ├── beehive_oven.png │ │ │ │ ├── energychemica.png │ │ │ │ ├── energybarchemica.png │ │ │ │ ├── temperature_bg.png │ │ │ │ ├── temperature_fg.png │ │ │ │ ├── progress_arrow_bg.png │ │ │ │ ├── progress_arrow_fg.png │ │ │ │ └── secondary_product_arrow.png │ │ │ ├── block │ │ │ │ ├── generator_front_on.png.mcmeta │ │ │ │ ├── input.png │ │ │ │ ├── output.png │ │ │ │ ├── bauxite.png │ │ │ │ ├── crusher.png │ │ │ │ ├── energy100.png │ │ │ │ ├── energy20.png │ │ │ │ ├── energy40.png │ │ │ │ ├── energy60.png │ │ │ │ ├── energy80.png │ │ │ │ ├── limestone.png │ │ │ │ ├── coke_block.png │ │ │ │ ├── cuprite_ore.png │ │ │ │ ├── galena_ore.png │ │ │ │ ├── pyrite_ore.png │ │ │ │ ├── rutile_ore.png │ │ │ │ ├── silver_ore.png │ │ │ │ ├── zincite_ore.png │ │ │ │ ├── alloy_furnace.png │ │ │ │ ├── argentite_ore.png │ │ │ │ ├── battery_block.png │ │ │ │ ├── generator_side.png │ │ │ │ ├── malachite_ore.png │ │ │ │ ├── sphalerite_ore.png │ │ │ │ ├── cassiterite_ore.png │ │ │ │ ├── chalcopyrite_ore.png │ │ │ │ ├── crude_iron_block.png │ │ │ │ ├── fireproof_bricks.png │ │ │ │ ├── sandstone_bricks.png │ │ │ │ ├── basic_crusher_front.png │ │ │ │ ├── basic_crusher_side.png │ │ │ │ ├── basic_crusher_top.png │ │ │ │ ├── basic_crusher_top2.png │ │ │ │ ├── basic_macine_block.png │ │ │ │ ├── generator_front_off.png │ │ │ │ ├── generator_front_on.png │ │ │ │ ├── basic_energy_box_face.png │ │ │ │ ├── basic_energy_box_side.png │ │ │ │ ├── beehive_oven_control.png │ │ │ │ ├── metalblocks │ │ │ │ │ ├── tin_block.png │ │ │ │ │ ├── brass_block.png │ │ │ │ │ ├── brass_bricks.png │ │ │ │ │ ├── bronze_block.png │ │ │ │ │ ├── copper_block.png │ │ │ │ │ ├── lead_block.png │ │ │ │ │ ├── lead_bricks.png │ │ │ │ │ ├── silver_block.png │ │ │ │ │ ├── steel_block.png │ │ │ │ │ ├── steel_bricks.png │ │ │ │ │ ├── tin_bricks.png │ │ │ │ │ ├── zinc_block.png │ │ │ │ │ ├── zinc_bricks.png │ │ │ │ │ ├── bronze_bricks.png │ │ │ │ │ ├── copper_bricks.png │ │ │ │ │ ├── silver_bricks.png │ │ │ │ │ ├── aluminium_block.png │ │ │ │ │ ├── aluminium_bricks.png │ │ │ │ │ ├── magnesium_block.png │ │ │ │ │ ├── magnesium_bricks.png │ │ │ │ │ ├── conductive_alloy_block.png │ │ │ │ │ └── conductive_alloy_brick.png │ │ │ │ ├── alloy_furnace_front_on.png │ │ │ │ ├── basic_blast_furnance_top.png │ │ │ │ ├── basic_electric_furnace.png │ │ │ │ ├── beehive_oven_control_on.png │ │ │ │ ├── basic_blast_furnace_front.png │ │ │ │ ├── basic_blast_furnance_sides.png │ │ │ │ ├── basic_blast_furnance_front_on.png │ │ │ │ ├── basic_electric_crusher_face.png │ │ │ │ ├── basic_electric_crusher_sides.png │ │ │ │ ├── basic_electric_furnace_side.png │ │ │ │ ├── basic_electric_furnace_face_idle.png │ │ │ │ └── basic_electric_furnace_face_working.png │ │ │ ├── item │ │ │ │ ├── util │ │ │ │ │ ├── tester.png │ │ │ │ │ └── screwdriver.png │ │ │ │ ├── energy │ │ │ │ │ ├── battery.png │ │ │ │ │ ├── basic_wire.png │ │ │ │ │ └── basic_battery.png │ │ │ │ └── materials │ │ │ │ │ ├── silicon.png │ │ │ │ │ ├── coalcoke.png │ │ │ │ │ ├── lead_ingot.png │ │ │ │ │ ├── tin_ingot.png │ │ │ │ │ ├── zinc_ingot.png │ │ │ │ │ ├── bauxite_ball.png │ │ │ │ │ ├── brass_ingot.png │ │ │ │ │ ├── bronze_ingot.png │ │ │ │ │ ├── copper_ingot.png │ │ │ │ │ ├── silver_ingot.png │ │ │ │ │ ├── steel_ingot.png │ │ │ │ │ ├── wooden_gear.png │ │ │ │ │ ├── aluminum_ingot.png │ │ │ │ │ ├── basic_curcuit.png │ │ │ │ │ ├── bauxite_brick.png │ │ │ │ │ ├── crude_iron_gear.png │ │ │ │ │ ├── dust │ │ │ │ │ ├── brass_dust.png │ │ │ │ │ ├── lead_dust.png │ │ │ │ │ ├── steel_dust.png │ │ │ │ │ ├── tin_dust.png │ │ │ │ │ ├── zinc_dust.png │ │ │ │ │ ├── bronze_dust.png │ │ │ │ │ ├── copper_dust.png │ │ │ │ │ ├── silver_dust.png │ │ │ │ │ ├── aluminum_dust.png │ │ │ │ │ ├── magnesium_dust.png │ │ │ │ │ └── conductive_alloy_dust.png │ │ │ │ │ ├── magnesium_ingot.png │ │ │ │ │ ├── chunks │ │ │ │ │ ├── lead_chunk.png │ │ │ │ │ ├── tin_chunk.png │ │ │ │ │ ├── zinc_chunk.png │ │ │ │ │ ├── brass_chunk.png │ │ │ │ │ ├── bronze_chunk.png │ │ │ │ │ ├── copper_chunk.png │ │ │ │ │ ├── silver_chunk.png │ │ │ │ │ ├── steel_chunk.png │ │ │ │ │ ├── aluminum_chunk.png │ │ │ │ │ ├── magnesium_chunk.png │ │ │ │ │ └── conductive_alloy_chunk.png │ │ │ │ │ ├── basic_curcuit_board.png │ │ │ │ │ ├── conductive_alloy_ingot.png │ │ │ │ │ └── oredust │ │ │ │ │ ├── coal_ore_dust.png │ │ │ │ │ ├── gold_ore_dust.png │ │ │ │ │ ├── iron_ore_dust.png │ │ │ │ │ ├── lapis_ore_dust.png │ │ │ │ │ ├── cuprite_ore_dust.png │ │ │ │ │ ├── diamond_ore_dust.png │ │ │ │ │ ├── galena_ore_dust.png │ │ │ │ │ ├── pyrite_ore_dust.png │ │ │ │ │ ├── redstone_ore_dust.png │ │ │ │ │ ├── rutile_ore_dust.png │ │ │ │ │ ├── silver_ore_dust.png │ │ │ │ │ ├── zincite_ore_dust.png │ │ │ │ │ ├── argentite_ore_dust.png │ │ │ │ │ ├── malachite_ore_dust.png │ │ │ │ │ ├── sphalerite_ore_dust.png │ │ │ │ │ ├── cassiterite_ore_dust.png │ │ │ │ │ └── chalcopyrite_ore_dust.png │ │ │ └── misc │ │ │ │ └── progressbar_fg.png │ │ │ └── lang │ │ │ └── en_us.json │ ├── data │ │ ├── minecraft │ │ │ └── tags │ │ │ │ └── blocks │ │ │ │ └── walls.json │ │ └── chemica │ │ │ ├── recipes │ │ │ ├── generator │ │ │ │ └── coal.json │ │ │ ├── furnace │ │ │ │ └── copper_ingot.json │ │ │ ├── basic_crusher │ │ │ │ ├── coal_ore_dust.json │ │ │ │ ├── galena_ore_dust.json │ │ │ │ ├── gold_ore_dust.json │ │ │ │ ├── iron_ore_dust.json │ │ │ │ ├── pyrite_ore_dust.json │ │ │ │ ├── rutile_ore_dust.json │ │ │ │ ├── silver_ore_dust.json │ │ │ │ ├── cuprite_ore_dust.json │ │ │ │ ├── diamond_ore_dust.json │ │ │ │ ├── zincite_ore_dust.json │ │ │ │ ├── argentite_ore_dust.json │ │ │ │ ├── malachite_ore_dust.json │ │ │ │ ├── redstone_ore_dust.json │ │ │ │ ├── cassiterite_ore_dust.json │ │ │ │ ├── sphalerite_ore_dust.json │ │ │ │ └── chalcopyrite_ore_dust.json │ │ │ ├── beehive_oven │ │ │ │ ├── coke.json │ │ │ │ ├── charcoal.json │ │ │ │ └── coke_block.json │ │ │ ├── shaped_crafting │ │ │ │ ├── coke_block.json │ │ │ │ └── crusher.json │ │ │ └── stone_alloy_smelter │ │ │ │ └── bronze_ingot.json │ │ │ └── loot_tables │ │ │ └── blocks │ │ │ ├── crank.json │ │ │ ├── crusher.json │ │ │ ├── coke_block.json │ │ │ ├── galena_ore.json │ │ │ ├── pyrite_ore.json │ │ │ ├── rutile_ore.json │ │ │ ├── silver_ore.json │ │ │ ├── cuprite_ore.json │ │ │ ├── zincite_ore.json │ │ │ ├── argentite_ore.json │ │ │ ├── cassiterite_ore.json │ │ │ ├── malachite_ore.json │ │ │ ├── sphalerite_ore.json │ │ │ ├── chalcopyrite_ore.json │ │ │ ├── fireproof_bricks.json │ │ │ ├── sandstone_bricks.json │ │ │ ├── beehive_oven_control.json │ │ │ ├── fireproof_brick_wall.json │ │ │ ├── sandstone_brick_wall.json │ │ │ ├── solid_fuel_generator.json │ │ │ ├── fireproof_brick_stairs.json │ │ │ ├── sandstone_brick_stairs.json │ │ │ ├── fireproof_brick_slab.json │ │ │ └── sandstone_brick_slab.json │ ├── chemica.mixins.json │ └── fabric.mod.json │ └── java │ └── team │ └── teasanctuary │ └── chemica │ ├── api │ ├── ICrankable.java │ ├── IEnergyProvider.java │ ├── IEnergyStorageHolder.java │ ├── IItemEnergyStorageHolder.java │ ├── CustomStairsBlock.java │ ├── IEnergyStorage.java │ ├── MachineBlockWithEnergy.java │ ├── MachineBlock.java │ ├── MachineBlockEntity.java │ ├── WToggle.java │ ├── EnergyStorage.java │ └── ImplementedInventory.java │ ├── util │ └── RegistryHelper.java │ ├── mixin │ └── FurnaceFuelMixin.java │ ├── gui │ ├── TesterItemController.java │ ├── EnergyBoxController.java │ ├── CrusherBlockController.java │ ├── StoneAlloySmelterController.java │ ├── SolidFuelGeneratorController.java │ └── BeehiveOvenController.java │ ├── items │ ├── TesterItem.java │ ├── ScrewdriverItem.java │ └── BatteryItem.java │ ├── entities │ ├── CrankBlockEntity.java │ ├── BasicWireBlockEntity.java │ ├── EnergyBoxEntity.java │ └── SolidFuelGeneratorEntity.java │ ├── blocks │ ├── EnergyBoxBlock.java │ ├── CrusherBlock.java │ ├── StoneAlloySmelterBlock.java │ └── CrankBlock.java │ ├── registry │ └── Items.java │ ├── recipes │ ├── GeneratorRecipe.java │ ├── BeehiveOvenRecipe.java │ └── CrusherRecipe.java │ ├── ClientMain.java │ └── ModMain.java ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── README.md ├── settings.gradle ├── .gitignore ├── gradle.properties └── gradlew.bat /src/main/resources/assets/chemica/models/item/bauxite.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/bauxite" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/crusher.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/crusher" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/basic_wire.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/conduit_side" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/coke_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/coke_block" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/energy_box.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/energy_box" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/cuprite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/cuprite_ore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/galena_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/galena_ore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/pyrite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/pyrite_ore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/rutile_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/rutile_ore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/silver_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/silver_ore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/zincite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/zincite_ore" 3 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/argentite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/argentite_ore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/fireproof_bricks.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/fireproof_bricks" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/malachite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/malachite_ore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/sandstone_bricks.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/sandstone_bricks" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/cassiterite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/cassiterite_ore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/chalcopyrite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/chalcopyrite_ore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/sphalerite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/ores/sphalerite_ore" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/beehive_oven_control.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/beehive_oven_control" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/fireproof_brick_slab.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/fireproof_brick_slab" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/sandstone_brick_slab.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/sandstone_brick_slab" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/solid_fuel_generator.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/solid_fuel_generator" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/stone_alloy_smelter.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/stone_alloy_smelter" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/icon.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/fireproof_brick_stairs.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/fireproof_brick_stairs" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/sandstone_brick_stairs.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/sandstone_brick_stairs" 3 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chemica 2 | 3 | Minecraft mod. Coming when it's done. 4 | 5 | ## License 6 | 7 | This mod is available under the GNU GPL v3. 8 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/bauxite.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/bauxite" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/fireproof_brick_wall.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/fireproof_brick_wall_inventory" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/sandstone_brick_wall.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "chemica:block/sandstone_brick_wall_inventory" 3 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/ICrankable.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | public interface ICrankable { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/coke_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/coke_block" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/energy_box.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/energy_box" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/galena_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/galena_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/pyrite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/pyrite_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/rutile_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/rutile_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/silver_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/silver_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/IEnergyProvider.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | public interface IEnergyProvider { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/cuprite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/cuprite_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/zincite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/zincite_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/argentite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/argentite_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/cassiterite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/cassiterite_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/malachite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/malachite_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/sandstone_bricks.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/sandstone_bricks" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/sphalerite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/sphalerite_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/fluids/redstone_flow.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "animation": { 3 | "interpolate": true, 4 | "frametime": 2 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/chalcopyrite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/ores/chalcopyrite_ore" } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/toggle.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/tester.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/util/tester" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/generator_front_on.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "animation": { 3 | "interpolate": true, 4 | "frametime": 10 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/input.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/output.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/fire_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/fire_bar.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/fireproof_bricks.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { "model": "chemica:block/fireproof_bricks", "uvlock": true } 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/coke.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/coalcoke" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/bauxite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/bauxite.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/crusher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/crusher.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/energy100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/energy100.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/energy20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/energy20.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/energy40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/energy40.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/energy60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/energy60.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/energy80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/energy80.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/limestone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/limestone.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/fluids/energy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/fluids/energy.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/energybar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/energybar.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/fire_bar_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/fire_bar_bg.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/fire_bar_fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/fire_bar_fg.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/generator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/generator.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/battery.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/energy/basic_battery" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/screwdriver.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/util/screwdriver" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/tin_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/tin_ingot" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/coke_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/coke_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/cuprite_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/cuprite_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/galena_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/galena_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/pyrite_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/pyrite_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/rutile_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/rutile_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/silver_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/silver_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/zincite_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/zincite_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/beehive_oven.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/beehive_oven.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/energychemica.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/energychemica.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/util/tester.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/util/tester.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/fireproof_bricks.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube_all", 3 | "textures": { 4 | "all": "chemica:block/fireproof_bricks" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/bronze_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/bronze_ingot" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/copper_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/copper_ingot" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/lead_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/lead_ingot" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/silver_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/silver_ingot" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/steel_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/steel_ingot" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/wooden_gear.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/wooden_gear" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/zinc_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/zinc_ingot" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/alloy_furnace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/alloy_furnace.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/argentite_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/argentite_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/battery_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/battery_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/generator_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/generator_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/malachite_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/malachite_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/sphalerite_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/sphalerite_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/fluids/energyfluid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/fluids/energyfluid.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/fluids/redstone_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/fluids/redstone_flow.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/energybarchemica.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/energybarchemica.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/temperature_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/temperature_bg.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/temperature_fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/temperature_fg.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/energy/battery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/energy/battery.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/misc/progressbar_fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/misc/progressbar_fg.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/aluminum_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/aluminum_ingot" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/cassiterite_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/cassiterite_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/chalcopyrite_ore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/chalcopyrite_ore.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/crude_iron_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/crude_iron_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/fireproof_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/fireproof_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/sandstone_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/sandstone_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/fluids/redstone_still.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/fluids/redstone_still.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/progress_arrow_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/progress_arrow_bg.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/progress_arrow_fg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/progress_arrow_fg.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/energy/basic_wire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/energy/basic_wire.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/silicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/silicon.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/util/screwdriver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/util/screwdriver.png -------------------------------------------------------------------------------- /src/main/resources/data/minecraft/tags/blocks/walls.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "chemica:fireproof_brick_wall", 5 | "chemica:sandstone_brick_wall" 6 | ] 7 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/coal_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/coal_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/gold_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/gold_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/iron_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/iron_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/magnesium_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/magnesium_ingot" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_crusher_front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_crusher_front.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_crusher_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_crusher_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_crusher_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_crusher_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_crusher_top2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_crusher_top2.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_macine_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_macine_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/generator_front_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/generator_front_off.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/generator_front_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/generator_front_on.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/energy/basic_battery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/energy/basic_battery.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/coalcoke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/coalcoke.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/lead_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/lead_ingot.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/tin_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/tin_ingot.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/zinc_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/zinc_ingot.png -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/generator/coal.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:generator_recipe", 3 | "ingredient": { 4 | "item": "minecraft:coal" 5 | }, 6 | "burnTime": 240 7 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/galena_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/galena_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/pyrite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/pyrite_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/rutile_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/rutile_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/silver_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/silver_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_energy_box_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_energy_box_face.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_energy_box_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_energy_box_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/beehive_oven_control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/beehive_oven_control.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/tin_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/tin_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/gui/secondary_product_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/gui/secondary_product_arrow.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/bauxite_ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/bauxite_ball.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/brass_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/brass_ingot.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/bronze_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/bronze_ingot.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/copper_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/copper_ingot.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/silver_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/silver_ingot.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/steel_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/steel_ingot.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/wooden_gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/wooden_gear.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/fireproof_brick_wall_inventory.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/wall_inventory", 3 | "textures": { 4 | "wall": "chemica:block/fireproof_bricks" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/fireproof_brick_wall_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/template_wall_post", 3 | "textures": { 4 | "wall": "chemica:block/fireproof_bricks" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/fireproof_brick_wall_side.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/template_wall_side", 3 | "textures": { 4 | "wall": "chemica:block/fireproof_bricks" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/sandstone_brick_wall_inventory.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/wall_inventory", 3 | "textures": { 4 | "wall": "chemica:block/sandstone_bricks" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/sandstone_brick_wall_post.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/template_wall_post", 3 | "textures": { 4 | "wall": "chemica:block/sandstone_bricks" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/sandstone_brick_wall_side.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/template_wall_side", 3 | "textures": { 4 | "wall": "chemica:block/sandstone_bricks" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/argentite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/argentite_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/cuprite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/cuprite_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/diamond_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/diamond_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/malachite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/malachite_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/redstone_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/redstone_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/zincite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/zincite_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/alloy_furnace_front_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/alloy_furnace_front_on.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_blast_furnance_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_blast_furnance_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_electric_furnace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_electric_furnace.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/beehive_oven_control_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/beehive_oven_control_on.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/brass_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/brass_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/brass_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/brass_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/bronze_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/bronze_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/copper_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/copper_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/lead_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/lead_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/lead_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/lead_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/silver_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/silver_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/steel_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/steel_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/steel_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/steel_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/tin_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/tin_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/zinc_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/zinc_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/zinc_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/zinc_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/aluminum_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/aluminum_ingot.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/basic_curcuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/basic_curcuit.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/bauxite_brick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/bauxite_brick.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/crude_iron_gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/crude_iron_gear.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/brass_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/brass_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/lead_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/lead_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/steel_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/steel_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/tin_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/tin_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/zinc_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/zinc_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/magnesium_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/magnesium_ingot.png -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/IEnergyStorageHolder.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | public interface IEnergyStorageHolder { 4 | IEnergyStorage getEnergyStorage(); 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/cassiterite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/cassiterite_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/sphalerite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/sphalerite_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_blast_furnace_front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_blast_furnace_front.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_blast_furnance_sides.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_blast_furnance_sides.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/bronze_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/bronze_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/copper_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/copper_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/silver_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/silver_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/lead_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/lead_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/tin_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/tin_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/zinc_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/zinc_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/bronze_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/bronze_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/copper_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/copper_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/silver_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/silver_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/chalcopyrite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "textures": { 4 | "layer0": "chemica:item/materials/oredust/chalcopyrite_ore_dust" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_blast_furnance_front_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_blast_furnance_front_on.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_electric_crusher_face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_electric_crusher_face.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_electric_crusher_sides.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_electric_crusher_sides.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_electric_furnace_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_electric_furnace_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/aluminium_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/aluminium_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/aluminium_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/aluminium_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/magnesium_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/magnesium_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/magnesium_bricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/magnesium_bricks.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/basic_curcuit_board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/basic_curcuit_board.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/brass_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/brass_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/bronze_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/bronze_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/copper_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/copper_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/silver_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/silver_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/steel_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/steel_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/aluminum_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/aluminum_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/magnesium_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/magnesium_dust.png -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/furnace/copper_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:smelting", 3 | "ingredient": { 4 | "item": "chemica:malachite_ore" 5 | }, 6 | "result": "chemica:copper_ingot" 7 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/aluminum_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/aluminum_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/magnesium_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/magnesium_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/conductive_alloy_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/conductive_alloy_ingot.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/coal_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/coal_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/gold_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/gold_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/iron_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/iron_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/lapis_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/lapis_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_electric_furnace_face_idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_electric_furnace_face_idle.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/conductive_alloy_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/conductive_alloy_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/metalblocks/conductive_alloy_brick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/metalblocks/conductive_alloy_brick.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/cuprite_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/cuprite_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/diamond_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/diamond_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/galena_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/galena_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/pyrite_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/pyrite_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/redstone_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/redstone_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/rutile_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/rutile_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/silver_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/silver_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/zincite_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/zincite_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/block/basic_electric_furnace_face_working.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/block/basic_electric_furnace_face_working.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/dust/conductive_alloy_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/dust/conductive_alloy_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/argentite_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/argentite_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/malachite_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/malachite_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/sphalerite_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/sphalerite_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/chunks/conductive_alloy_chunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/chunks/conductive_alloy_chunk.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/cassiterite_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/cassiterite_ore_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/textures/item/materials/oredust/chalcopyrite_ore_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rndtrash/chemica/master/src/main/resources/assets/chemica/textures/item/materials/oredust/chalcopyrite_ore_dust.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | jcenter() 4 | maven { 5 | name = 'Fabric' 6 | url = 'https://maven.fabricmc.net/' 7 | } 8 | gradlePluginPortal() 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/IItemEnergyStorageHolder.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | import net.minecraft.item.ItemStack; 4 | 5 | public interface IItemEnergyStorageHolder { 6 | IEnergyStorage getEnergyStorage(ItemStack stack); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/fireproof_brick_slab.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/slab", 3 | "textures": { 4 | "bottom": "chemica:block/fireproof_bricks", 5 | "top": "chemica:block/fireproof_bricks", 6 | "side": "chemica:block/fireproof_bricks" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/sandstone_brick_slab.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/slab", 3 | "textures": { 4 | "bottom": "chemica:block/sandstone_bricks", 5 | "top": "chemica:block/sandstone_bricks", 6 | "side": "chemica:block/sandstone_bricks" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/fireproof_brick_stairs.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/stairs", 3 | "textures": { 4 | "bottom": "chemica:block/fireproof_bricks", 5 | "top": "chemica:block/fireproof_bricks", 6 | "side": "chemica:block/fireproof_bricks" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/sandstone_brick_stairs.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/stairs", 3 | "textures": { 4 | "bottom": "chemica:block/sandstone_bricks", 5 | "top": "chemica:block/sandstone_bricks", 6 | "side": "chemica:block/sandstone_bricks" 7 | } 8 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri May 01 22:50:17 MSK 2020 2 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip 3 | distributionBase=GRADLE_USER_HOME 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/fireproof_brick_slab_top.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/slab_top", 3 | "textures": { 4 | "bottom": "chemica:block/fireproof_bricks", 5 | "top": "chemica:block/fireproof_bricks", 6 | "side": "chemica:block/fireproof_bricks" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/sandstone_brick_slab_top.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/slab_top", 3 | "textures": { 4 | "bottom": "chemica:block/sandstone_bricks", 5 | "top": "chemica:block/sandstone_bricks", 6 | "side": "chemica:block/sandstone_bricks" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/fireproof_brick_stairs_inner.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/inner_stairs", 3 | "textures": { 4 | "bottom": "chemica:block/fireproof_bricks", 5 | "top": "chemica:block/fireproof_bricks", 6 | "side": "chemica:block/fireproof_bricks" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/fireproof_brick_stairs_outer.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/outer_stairs", 3 | "textures": { 4 | "bottom": "chemica:block/fireproof_bricks", 5 | "top": "chemica:block/fireproof_bricks", 6 | "side": "chemica:block/fireproof_bricks" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/sandstone_brick_stairs_inner.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/inner_stairs", 3 | "textures": { 4 | "bottom": "chemica:block/sandstone_bricks", 5 | "top": "chemica:block/sandstone_bricks", 6 | "side": "chemica:block/sandstone_bricks" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/sandstone_brick_stairs_outer.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/outer_stairs", 3 | "textures": { 4 | "bottom": "chemica:block/sandstone_bricks", 5 | "top": "chemica:block/sandstone_bricks", 6 | "side": "chemica:block/sandstone_bricks" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/coal_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "minecraft:coal_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:coal_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/galena_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:galena_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:galena_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/gold_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "minecraft:gold_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:gold_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/iron_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "minecraft:iron_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:iron_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/pyrite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:pyrite_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:pyrite_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/rutile_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:rutile_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:rutile_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/silver_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:silver_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:silver_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/cuprite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:cuprite_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:cuprite_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/diamond_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "minecraft:diamond_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:diamond_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/zincite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:zincite_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:zincite_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/argentite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:argentite_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:argentite_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/malachite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:malachite_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:malachite_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/redstone_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "minecraft:redstone_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:redstone_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/beehive_oven/coke.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:beehive_oven_recipe", 3 | "ingredient": { 4 | "item": "minecraft:coal" 5 | }, 6 | "result": { 7 | "item": "chemica:coke", 8 | "count": 1 9 | }, 10 | "burnTime": 1600, 11 | "threshold": 1000 12 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # gradle 2 | 3 | .gradle/ 4 | build/ 5 | out/ 6 | classes/ 7 | 8 | # eclipse 9 | 10 | *.launch 11 | 12 | # idea 13 | 14 | .idea/ 15 | *.iml 16 | *.ipr 17 | *.iws 18 | 19 | # vscode 20 | 21 | .settings/ 22 | .vscode/ 23 | bin/ 24 | .classpath 25 | .project 26 | 27 | # fabric 28 | 29 | run/ 30 | -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/cassiterite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:cassiterite_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:cassiterite_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/sphalerite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:sphalerite_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:sphalerite_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/beehive_oven/charcoal.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:beehive_oven_recipe", 3 | "ingredient": { 4 | "tag": "minecraft:logs" 5 | }, 6 | "result": { 7 | "item": "minecraft:charcoal", 8 | "count": 1 9 | }, 10 | "burnTime": 300, 11 | "threshold": 600 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/fireproof_brick_slab.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "type=bottom": { "model": "chemica:block/fireproof_brick_slab" }, 4 | "type=top": { "model": "chemica:block/fireproof_brick_slab_top" }, 5 | "type=double": { "model": "chemica:block/fireproof_bricks" } 6 | } 7 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/sandstone_brick_slab.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "type=bottom": { "model": "chemica:block/sandstone_brick_slab" }, 4 | "type=top": { "model": "chemica:block/sandstone_brick_slab_top" }, 5 | "type=double": { "model": "chemica:block/sandstone_bricks" } 6 | } 7 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/basic_crusher/chalcopyrite_ore_dust.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:crusher_recipe", 3 | "ingredient": { 4 | "item": "chemica:chalcopyrite_ore" 5 | }, 6 | "result": { 7 | "item": "chemica:chalcopyrite_ore_dust", 8 | "count": 1 9 | }, 10 | "ticks": 100 11 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/stone_alloy_smelter.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "minecraft:block/furnace_top", 5 | "bottom": "minecraft:block/furnace_side", 6 | "side": "minecraft:block/furnace_top", 7 | "front": "chemica:block/alloy_furnace" 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/beehive_oven/coke_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:beehive_oven_recipe", 3 | "ingredient": { 4 | "item": "minecraft:coal_block" 5 | }, 6 | "result": { 7 | "item": "chemica:coke_block", 8 | "count": 1 9 | }, 10 | "burnTime": 16000, 11 | "threshold": 1000 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/crusher.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chemica:block/basic_crusher_top2", 5 | "bottom": "chemica:block/basic_crusher_top2", 6 | "side": "chemica:block/basic_crusher_side", 7 | "front": "chemica:block/basic_crusher_front" 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/solid_fuel_generator.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chemica:block/generator_side", 5 | "bottom": "chemica:block/generator_side", 6 | "side": "chemica:block/generator_side", 7 | "front": "chemica:block/generator_front_off" 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/beehive_oven_control.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chemica:block/fireproof_bricks", 5 | "bottom": "chemica:block/fireproof_bricks", 6 | "side": "chemica:block/fireproof_bricks", 7 | "front": "chemica:block/beehive_oven_control" 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/solid_fuel_generator_burning.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chemica:block/generator_side", 5 | "bottom": "chemica:block/generator_side", 6 | "side": "chemica:block/generator_side", 7 | "front": "chemica:block/generator_front_on" 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/resources/chemica.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.8", 4 | "package": "team.teasanctuary.chemica.mixin", 5 | "compatibilityLevel": "JAVA_8", 6 | "mixins": [ 7 | "FurnaceFuelMixin" 8 | ], 9 | "client": [ 10 | ], 11 | "injectors": { 12 | "defaultRequire": 1 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/stone_alloy_smelter_burning.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "minecraft:block/furnace_top", 5 | "bottom": "minecraft:block/furnace_side", 6 | "side": "minecraft:block/furnace_top", 7 | "front": "chemica:block/alloy_furnace_front_on" 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/beehive_oven_control_on.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/orientable", 3 | "textures": { 4 | "top": "chemica:block/fireproof_bricks", 5 | "bottom": "chemica:block/fireproof_bricks", 6 | "side": "chemica:block/fireproof_bricks", 7 | "front": "chemica:block/beehive_oven_control_on" 8 | } 9 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/crusher.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north": { "model": "chemica:block/crusher" }, 4 | "facing=east": { "model": "chemica:block/crusher", "y": 90 }, 5 | "facing=south": { "model": "chemica:block/crusher", "y": 180 }, 6 | "facing=west": { "model": "chemica:block/crusher", "y": 270 } 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/shaped_crafting/coke_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "pattern": [ 4 | "xxx", 5 | "xxx", 6 | "xxx" 7 | ], 8 | "key": { 9 | "x": { 10 | "item": "chemica:coke" 11 | } 12 | }, 13 | "result": { 14 | "item": "chemica:coke_block", 15 | "count": 1 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/util/RegistryHelper.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.util; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.util.Identifier; 5 | 6 | public class RegistryHelper { 7 | 8 | // public static Block registerBlock(Identifier id, Class blockClass, Class blockEntityClass) { 9 | // 10 | // } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/bauxite.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/bauxite", 5 | "up": "chemica:block/bauxite", 6 | "north": "chemica:block/bauxite", 7 | "east": "chemica:block/bauxite", 8 | "west": "chemica:block/bauxite", 9 | "south": "chemica:block/bauxite", 10 | "particle": "block/sand" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/crank.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north": { "model": "chemica:block/crank", "uvlock": true, "y": 0 }, 4 | "facing=east": { "model": "chemica:block/crank", "uvlock": true, "y": 90 }, 5 | "facing=south": { "model": "chemica:block/crank", "uvlock": true, "y": 180 }, 6 | "facing=west": { "model": "chemica:block/crank", "uvlock": true, "y": 270 } 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/coke_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/coke_block", 5 | "up": "chemica:block/coke_block", 6 | "north": "chemica:block/coke_block", 7 | "east": "chemica:block/coke_block", 8 | "west": "chemica:block/coke_block", 9 | "south": "chemica:block/coke_block", 10 | "particle": "block/sand" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/stone_alloy_smelter/bronze_ingot.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "chemica:stone_alloy_smelter_recipe", 3 | "ingredient": { 4 | "item": "chemica:copper_ingot", 5 | "count": 3 6 | }, 7 | "ingredient2": { 8 | "item": "chemica:tin_ingot", 9 | "count": 1 10 | }, 11 | "result": { 12 | "item": "chemica:bronze_ingot", 13 | "count": 4 14 | }, 15 | "cookTime": 200 16 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/galena_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/galena_ore", 5 | "up": "chemica:block/galena_ore", 6 | "north": "chemica:block/galena_ore", 7 | "east": "chemica:block/galena_ore", 8 | "west": "chemica:block/galena_ore", 9 | "south": "chemica:block/galena_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/pyrite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/pyrite_ore", 5 | "up": "chemica:block/pyrite_ore", 6 | "north": "chemica:block/pyrite_ore", 7 | "east": "chemica:block/pyrite_ore", 8 | "west": "chemica:block/pyrite_ore", 9 | "south": "chemica:block/pyrite_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/rutile_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/rutile_ore", 5 | "up": "chemica:block/rutile_ore", 6 | "north": "chemica:block/rutile_ore", 7 | "east": "chemica:block/rutile_ore", 8 | "west": "chemica:block/rutile_ore", 9 | "south": "chemica:block/rutile_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/silver_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/silver_ore", 5 | "up": "chemica:block/silver_ore", 6 | "north": "chemica:block/silver_ore", 7 | "east": "chemica:block/silver_ore", 8 | "west": "chemica:block/silver_ore", 9 | "south": "chemica:block/silver_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/CustomStairsBlock.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | import net.minecraft.block.BlockState; 4 | import net.minecraft.block.StairsBlock; 5 | 6 | // Thanks, Mahjong! 7 | 8 | public class CustomStairsBlock extends StairsBlock { 9 | public CustomStairsBlock(BlockState baseBlockState, Settings settings) { 10 | super(baseBlockState, settings); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/cuprite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/cuprite_ore", 5 | "up": "chemica:block/cuprite_ore", 6 | "north": "chemica:block/cuprite_ore", 7 | "east": "chemica:block/cuprite_ore", 8 | "west": "chemica:block/cuprite_ore", 9 | "south": "chemica:block/cuprite_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/zincite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/zincite_ore", 5 | "up": "chemica:block/zincite_ore", 6 | "north": "chemica:block/zincite_ore", 7 | "east": "chemica:block/zincite_ore", 8 | "west": "chemica:block/zincite_ore", 9 | "south": "chemica:block/zincite_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/crank.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:crank" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/crusher.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:crusher" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/argentite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/argentite_ore", 5 | "up": "chemica:block/argentite_ore", 6 | "north": "chemica:block/argentite_ore", 7 | "east": "chemica:block/argentite_ore", 8 | "west": "chemica:block/argentite_ore", 9 | "south": "chemica:block/argentite_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/malachite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/malachite_ore", 5 | "up": "chemica:block/malachite_ore", 6 | "north": "chemica:block/malachite_ore", 7 | "east": "chemica:block/malachite_ore", 8 | "west": "chemica:block/malachite_ore", 9 | "south": "chemica:block/malachite_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/coke_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:coke_block" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/galena_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:galena_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/pyrite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:pyrite_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/rutile_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:rutile_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/silver_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:silver_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/cuprite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:cuprite_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/zincite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:zincite_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/sphalerite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/sphalerite_ore", 5 | "up": "chemica:block/sphalerite_ore", 6 | "north": "chemica:block/sphalerite_ore", 7 | "east": "chemica:block/sphalerite_ore", 8 | "west": "chemica:block/sphalerite_ore", 9 | "south": "chemica:block/sphalerite_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/argentite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:argentite_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/cassiterite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:cassiterite_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/malachite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:malachite_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/sphalerite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:sphalerite_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/cassiterite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/cassiterite_ore", 5 | "up": "chemica:block/cassiterite_ore", 6 | "north": "chemica:block/cassiterite_ore", 7 | "east": "chemica:block/cassiterite_ore", 8 | "west": "chemica:block/cassiterite_ore", 9 | "south": "chemica:block/cassiterite_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/sandstone_bricks.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/sandstone_bricks", 5 | "up": "chemica:block/sandstone_bricks", 6 | "north": "chemica:block/sandstone_bricks", 7 | "east": "chemica:block/sandstone_bricks", 8 | "west": "chemica:block/sandstone_bricks", 9 | "south": "chemica:block/sandstone_bricks", 10 | "particle": "block/sand" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/chalcopyrite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:chalcopyrite_ore" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/fireproof_bricks.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:fireproof_bricks" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/sandstone_bricks.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:sandstone_bricks" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/beehive_oven_control.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:beehive_oven_control" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/fireproof_brick_wall.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:fireproof_brick_wall" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/sandstone_brick_wall.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:sandstone_brick_wall" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/solid_fuel_generator.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:solid_fuel_generator" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/ores/chalcopyrite_ore.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/chalcopyrite_ore", 5 | "up": "chemica:block/chalcopyrite_ore", 6 | "north": "chemica:block/chalcopyrite_ore", 7 | "east": "chemica:block/chalcopyrite_ore", 8 | "west": "chemica:block/chalcopyrite_ore", 9 | "south": "chemica:block/chalcopyrite_ore", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/fireproof_brick_stairs.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:fireproof_brick_stairs" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/sandstone_brick_stairs.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "name": "chemica:sandstone_brick_stairs" 10 | } 11 | ], 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:survives_explosion" 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/energy_box.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube", 3 | "textures": { 4 | "down": "chemica:block/basic_energy_box_side", 5 | "up": "chemica:block/basic_energy_box_side", 6 | "north": "chemica:block/basic_energy_box_face", 7 | "east": "chemica:block/basic_energy_box_side", 8 | "west": "chemica:block/basic_energy_box_side", 9 | "south": "chemica:block/basic_energy_box_side", 10 | "particle": "block/stone" 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/recipes/shaped_crafting/crusher.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "pattern": [ 4 | "CGC", 5 | "FGF", 6 | "CFC" 7 | ], 8 | "key": { 9 | "C": { 10 | "item": "minecraft:cobblestone" 11 | }, 12 | "G": { 13 | "item": "chemica:wooden_gear" 14 | }, 15 | "F": { 16 | "item": "minecraft:flint" 17 | } 18 | }, 19 | "result": { 20 | "item": "chemica:crusher", 21 | "count": 1 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/conduit_side.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "textures": { 4 | "0": "minecraft:block/brown_wool", 5 | "particle": "minecraft:block/brown_wool" 6 | }, 7 | "elements": [ 8 | { 9 | "from": [5, 0, 5], 10 | "to": [11, 5, 11], 11 | "faces": { 12 | "north": {"uv": [6, 0, 12, 5], "texture": "#0"}, 13 | "east": {"uv": [6, 0, 12, 5], "texture": "#0"}, 14 | "south": {"uv": [6, 0, 12, 5], "texture": "#0"}, 15 | "west": {"uv": [6, 0, 12, 5], "texture": "#0"} 16 | } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Done to increase the memory available to gradle. 2 | org.gradle.jvmargs=-Xmx1G 3 | 4 | # Fabric Properties 5 | # check these on https://fabricmc.net/use 6 | minecraft_version=1.15.2 7 | yarn_mappings=1.15.2+build.15 8 | loader_version=0.8.2+build.194 9 | 10 | # Mod Properties 11 | mod_version = 1.0.0 12 | maven_group = team.teasanctuary 13 | archives_base_name = chemica 14 | 15 | # Dependencies 16 | # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api 17 | fabric_version=0.5.1+build.294-1.15 18 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/conduit_center.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "parent": "minecraft:block/block", 4 | "textures": { 5 | "0": "minecraft:block/brown_wool", 6 | "particle": "minecraft:block/brown_wool" 7 | }, 8 | "elements": [ 9 | { 10 | "from": [5, 5, 5], 11 | "to": [11, 11, 11], 12 | "faces": { 13 | "north": {"uv": [0, 0, 6, 6], "texture": "#0"}, 14 | "east": {"uv": [0, 0, 6, 6], "texture": "#0"}, 15 | "south": {"uv": [0, 0, 6, 6], "texture": "#0"}, 16 | "west": {"uv": [0, 0, 6, 6], "texture": "#0"}, 17 | "up": {"uv": [0, 0, 6, 6], "texture": "#0"}, 18 | "down": {"uv": [0, 0, 6, 6], "texture": "#0"} 19 | } 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/conduit.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "textures": { 4 | "0": "block/brown_wool", 5 | "particle": "block/brown_wool" 6 | }, 7 | "elements": [ 8 | { 9 | "from": [0, 6, 5], 10 | "to": [16, 12, 11], 11 | "rotation": {"angle": 0, "axis": "y", "origin": [0, 6, 5]}, 12 | "faces": { 13 | "north": {"uv": [1, 3, 15, 9], "texture": "#0"}, 14 | "east": {"uv": [0, 0, 6, 6], "texture": "#0"}, 15 | "south": {"uv": [0, 0, 16, 6], "texture": "#0"}, 16 | "west": {"uv": [0, 0, 6, 6], "texture": "#0"}, 17 | "up": {"uv": [0, 0, 16, 6], "texture": "#0"}, 18 | "down": {"uv": [0, 0, 16, 6], "texture": "#0"} 19 | } 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/IEnergyStorage.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | public interface IEnergyStorage { 4 | 5 | int getAmount(); 6 | int getCapacity(); 7 | 8 | int extract(int n, boolean sim); 9 | int receive(int n, boolean sim); 10 | 11 | boolean canReceive(); 12 | void setReceive(boolean v); 13 | 14 | default int to(IEnergyStorage dest, final int amount) { 15 | if (amount > 0) { 16 | int sim = extract(amount, true); 17 | if (sim > 0) { 18 | sim = dest.receive(sim, true); 19 | if (sim > 0) { 20 | return dest.receive(extract(sim, false), false); 21 | } 22 | } 23 | } 24 | return 0; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/fireproof_brick_wall.json: -------------------------------------------------------------------------------- 1 | { 2 | "multipart": [ 3 | { "when": { "up": "true" }, 4 | "apply": { "model": "chemica:block/fireproof_brick_wall_post" } 5 | }, 6 | { "when": { "north": "true" }, 7 | "apply": { "model": "chemica:block/fireproof_brick_wall_side", "uvlock": true } 8 | }, 9 | { "when": { "east": "true" }, 10 | "apply": { "model": "chemica:block/fireproof_brick_wall_side", "y": 90, "uvlock": true } 11 | }, 12 | { "when": { "south": "true" }, 13 | "apply": { "model": "chemica:block/fireproof_brick_wall_side", "y": 180, "uvlock": true } 14 | }, 15 | { "when": { "west": "true" }, 16 | "apply": { "model": "chemica:block/fireproof_brick_wall_side", "y": 270, "uvlock": true } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/sandstone_brick_wall.json: -------------------------------------------------------------------------------- 1 | { 2 | "multipart": [ 3 | { "when": { "up": "true" }, 4 | "apply": { "model": "chemica:block/sandstone_brick_wall_post" } 5 | }, 6 | { "when": { "north": "true" }, 7 | "apply": { "model": "chemica:block/sandstone_brick_wall_side", "uvlock": true } 8 | }, 9 | { "when": { "east": "true" }, 10 | "apply": { "model": "chemica:block/sandstone_brick_wall_side", "y": 90, "uvlock": true } 11 | }, 12 | { "when": { "south": "true" }, 13 | "apply": { "model": "chemica:block/sandstone_brick_wall_side", "y": 180, "uvlock": true } 14 | }, 15 | { "when": { "west": "true" }, 16 | "apply": { "model": "chemica:block/sandstone_brick_wall_side", "y": 270, "uvlock": true } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/stone_alloy_smelter.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north,burning=false": { "model": "chemica:block/stone_alloy_smelter" }, 4 | "facing=east,burning=false": { "model": "chemica:block/stone_alloy_smelter", "y": 90 }, 5 | "facing=south,burning=false": { "model": "chemica:block/stone_alloy_smelter", "y": 180 }, 6 | "facing=west,burning=false": { "model": "chemica:block/stone_alloy_smelter", "y": 270 }, 7 | "facing=north,burning=true": { "model": "chemica:block/stone_alloy_smelter_burning" }, 8 | "facing=east,burning=true": { "model": "chemica:block/stone_alloy_smelter_burning", "y": 90 }, 9 | "facing=south,burning=true": { "model": "chemica:block/stone_alloy_smelter_burning", "y": 180 }, 10 | "facing=west,burning=true": { "model": "chemica:block/stone_alloy_smelter_burning", "y": 270 } 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/solid_fuel_generator.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north,burning=false": { "model": "chemica:block/solid_fuel_generator" }, 4 | "facing=east,burning=false": { "model": "chemica:block/solid_fuel_generator", "y": 90 }, 5 | "facing=south,burning=false": { "model": "chemica:block/solid_fuel_generator", "y": 180 }, 6 | "facing=west,burning=false": { "model": "chemica:block/solid_fuel_generator", "y": 270 }, 7 | "facing=north,burning=true": { "model": "chemica:block/solid_fuel_generator_burning" }, 8 | "facing=east,burning=true": { "model": "chemica:block/solid_fuel_generator_burning", "y": 90 }, 9 | "facing=south,burning=true": { "model": "chemica:block/solid_fuel_generator_burning", "y": 180 }, 10 | "facing=west,burning=true": { "model": "chemica:block/solid_fuel_generator_burning", "y": 270 } 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/mixin/FurnaceFuelMixin.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.mixin; 2 | 3 | import net.minecraft.block.entity.AbstractFurnaceBlockEntity; 4 | import net.minecraft.item.Item; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.ModifyVariable; 8 | import team.teasanctuary.chemica.registry.Blocks; 9 | import team.teasanctuary.chemica.registry.Items; 10 | 11 | import java.util.Map; 12 | 13 | @Mixin(AbstractFurnaceBlockEntity.class) 14 | public class FurnaceFuelMixin { 15 | 16 | @ModifyVariable(at = @At("RETURN"), method = "createFuelTimeMap") 17 | private static Map createFuelTimeMap(Map map) { 18 | map.put(Items.COKE_ITEM, 1600 * 4); 19 | map.put(Blocks.COKE_BLOCK_ITEM, 1600 * 4 * 10); 20 | return map; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/fireproof_brick_slab.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "functions": [ 10 | { 11 | "function": "minecraft:set_count", 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:block_state_property", 15 | "block": "chemica:fireproof_brick_slab", 16 | "properties": { 17 | "type": "double" 18 | } 19 | } 20 | ], 21 | "count": 2 22 | }, 23 | { 24 | "function": "minecraft:explosion_decay" 25 | } 26 | ], 27 | "name": "chemica:fireproof_brick_slab" 28 | } 29 | ] 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /src/main/resources/data/chemica/loot_tables/blocks/sandstone_brick_slab.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "rolls": 1, 6 | "entries": [ 7 | { 8 | "type": "minecraft:item", 9 | "functions": [ 10 | { 11 | "function": "minecraft:set_count", 12 | "conditions": [ 13 | { 14 | "condition": "minecraft:block_state_property", 15 | "block": "chemica:sandstone_brick_slab", 16 | "properties": { 17 | "type": "double" 18 | } 19 | } 20 | ], 21 | "count": 2 22 | }, 23 | { 24 | "function": "minecraft:explosion_decay" 25 | } 26 | ], 27 | "name": "chemica:sandstone_brick_slab" 28 | } 29 | ] 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /src/main/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "chemica", 4 | "version": "${version}", 5 | 6 | "name": "Chemica", 7 | "description": "This is an example description! Tell everyone what your mod is about!", 8 | "authors": [ 9 | "Me!" 10 | ], 11 | "contact": { 12 | "homepage": "https://fabricmc.net/", 13 | "sources": "https://github.com/FabricMC/fabric-example-mod" 14 | }, 15 | 16 | "license": "CC0-1.0", 17 | "icon": "assets/chemica/icon.png", 18 | 19 | "environment": "*", 20 | "entrypoints": { 21 | "main": [ 22 | "team.teasanctuary.chemica.ModMain" 23 | ], 24 | "client": [ 25 | "team.teasanctuary.chemica.ClientMain" 26 | ] 27 | }, 28 | "mixins": [ 29 | "chemica.mixins.json" 30 | ], 31 | 32 | "depends": { 33 | "fabricloader": ">=0.7.4", 34 | "fabric": "*", 35 | "minecraft": "1.15.x", 36 | "libgui": "1.8.x+1.15.x" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/beehive_oven_control.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=north,lit=false": { "model": "chemica:block/beehive_oven_control", "uvlock": true, "y": 0 }, 4 | "facing=east,lit=false": { "model": "chemica:block/beehive_oven_control", "uvlock": true, "y": 90 }, 5 | "facing=south,lit=false": { "model": "chemica:block/beehive_oven_control", "uvlock": true, "y": 180 }, 6 | "facing=west,lit=false": { "model": "chemica:block/beehive_oven_control", "uvlock": true, "y": 270 }, 7 | "facing=north,lit=true": { "model": "chemica:block/beehive_oven_control_on", "uvlock": true, "y": 0 }, 8 | "facing=east,lit=true": { "model": "chemica:block/beehive_oven_control_on", "uvlock": true, "y": 90 }, 9 | "facing=south,lit=true": { "model": "chemica:block/beehive_oven_control_on", "uvlock": true, "y": 180 }, 10 | "facing=west,lit=true": { "model": "chemica:block/beehive_oven_control_on", "uvlock": true, "y": 270 } 11 | } 12 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/MachineBlockWithEnergy.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | import net.minecraft.block.entity.BlockEntityType; 4 | import net.minecraft.nbt.CompoundTag; 5 | 6 | public abstract class MachineBlockWithEnergy extends MachineBlockEntity implements IEnergyStorageHolder { 7 | 8 | public MachineBlockWithEnergy(BlockEntityType type, int energyCap, boolean canReceiveEnergy, int invSize) { 9 | super(type, invSize); 10 | energy = new EnergyStorage(energyCap, canReceiveEnergy); 11 | } 12 | 13 | protected final EnergyStorage energy; 14 | 15 | @Override 16 | public CompoundTag toTag(CompoundTag tag) { 17 | energy.saveToNBT(tag); 18 | return super.toTag(tag); 19 | } 20 | 21 | @Override 22 | public void fromTag(CompoundTag tag) { 23 | super.fromTag(tag); 24 | energy.writeFromNBT(tag); 25 | } 26 | 27 | @Override 28 | public IEnergyStorage getEnergyStorage() { 29 | return energy; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/gui/TesterItemController.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.gui; 2 | 3 | import io.github.cottonmc.cotton.gui.CottonCraftingController; 4 | import io.github.cottonmc.cotton.gui.widget.WGridPanel; 5 | import io.github.cottonmc.cotton.gui.widget.WItemSlot; 6 | import io.github.cottonmc.cotton.gui.widget.WLabel; 7 | import io.github.cottonmc.cotton.gui.widget.data.Alignment; 8 | import net.minecraft.container.BlockContext; 9 | import net.minecraft.entity.player.PlayerInventory; 10 | import net.minecraft.recipe.RecipeType; 11 | 12 | public class TesterItemController extends CottonCraftingController { 13 | public TesterItemController(int syncId, PlayerInventory playerInventory, BlockContext context) { 14 | super(RecipeType.SMELTING, syncId, playerInventory, getBlockInventory(context), getBlockPropertyDelegate(context)); 15 | 16 | WGridPanel root = new WGridPanel(); 17 | setRootPanel(root); 18 | 19 | WLabel label = new WLabel("Tester"); 20 | label.setAlignment(Alignment.CENTER); 21 | root.add(label, 4, 0); 22 | 23 | WItemSlot slot = WItemSlot.of(blockInventory, 0); 24 | root.add(slot, 4, 1); 25 | 26 | root.add(createPlayerInventoryPanel(), 0, 3); 27 | 28 | root.validate(this); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/items/TesterItem.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.items; 2 | 3 | import net.fabricmc.fabric.api.container.ContainerProviderRegistry; 4 | import net.minecraft.entity.player.PlayerEntity; 5 | import net.minecraft.item.Item; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.util.*; 8 | import net.minecraft.world.World; 9 | import team.teasanctuary.chemica.api.ImplementedInventory; 10 | import team.teasanctuary.chemica.blocks.EnergyBoxBlock; 11 | 12 | public class TesterItem extends Item implements ImplementedInventory { 13 | public static final Identifier ID = new Identifier("chemica", "tester"); 14 | 15 | private final DefaultedList items = DefaultedList.ofSize(1, ItemStack.EMPTY); 16 | 17 | public TesterItem(Settings settings) { 18 | super(settings); 19 | } 20 | 21 | @Override 22 | public TypedActionResult use(World world, PlayerEntity user, Hand hand) { 23 | if (world != null && !world.isClient) { 24 | ContainerProviderRegistry.INSTANCE.openContainer(TesterItem.ID, user, (buffer) -> { 25 | buffer.writeBlockPos(user.getBlockPos()); 26 | }); 27 | } 28 | return super.use(world, user, hand); 29 | } 30 | 31 | @Override 32 | public DefaultedList getItems() { 33 | return items; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/blockstates/basic_wire.json: -------------------------------------------------------------------------------- 1 | { 2 | "multipart": [ 3 | { 4 | "apply": { 5 | "model": "chemica:block/conduit_center" 6 | } 7 | }, 8 | { 9 | "when": { 10 | "connected_east": true 11 | }, 12 | "apply": { 13 | "model": "chemica:block/conduit_side", 14 | "x": 270, 15 | "y": 90 16 | } 17 | }, 18 | { 19 | "when": { 20 | "connected_south": true 21 | }, 22 | "apply": { 23 | "model": "chemica:block/conduit_side", 24 | "x": 90 25 | } 26 | }, 27 | { 28 | "when": { 29 | "connected_west": true 30 | }, 31 | "apply": { 32 | "model": "chemica:block/conduit_side", 33 | "x": 90, 34 | "y": 90 35 | 36 | } 37 | }, 38 | { 39 | "when": { 40 | "connected_north": true 41 | }, 42 | "apply": { 43 | "model": "chemica:block/conduit_side", 44 | "x": 270 45 | } 46 | }, 47 | { 48 | "when": { 49 | "connected_up": true 50 | }, 51 | "apply": { 52 | "model": "chemica:block/conduit_side", 53 | "x": 180 54 | } 55 | }, 56 | { 57 | "when": { 58 | "connected_down": true 59 | }, 60 | "apply": { 61 | "model": "chemica:block/conduit_side" 62 | } 63 | } 64 | ] 65 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/items/ScrewdriverItem.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.items; 2 | 3 | import net.minecraft.block.entity.BlockEntity; 4 | import net.minecraft.entity.player.PlayerEntity; 5 | import net.minecraft.item.Item; 6 | import net.minecraft.item.ItemUsageContext; 7 | import net.minecraft.text.LiteralText; 8 | import net.minecraft.util.ActionResult; 9 | import net.minecraft.util.Identifier; 10 | import net.minecraft.util.math.BlockPos; 11 | import team.teasanctuary.chemica.api.IEnergyStorage; 12 | import team.teasanctuary.chemica.api.IEnergyStorageHolder; 13 | 14 | public class ScrewdriverItem extends Item { 15 | public static final Identifier ID = new Identifier("chemica", "screwdriver"); 16 | 17 | public ScrewdriverItem(Settings settings) { 18 | super(settings); 19 | } 20 | 21 | @Override 22 | public ActionResult useOnBlock(ItemUsageContext context) { 23 | BlockPos pos = context.getBlockPos(); 24 | 25 | BlockEntity be = context.getWorld().getBlockEntity(pos); 26 | 27 | if (be instanceof IEnergyStorageHolder) { 28 | PlayerEntity p = context.getPlayer(); 29 | IEnergyStorage e = ((IEnergyStorageHolder) be).getEnergyStorage(); 30 | p.addChatMessage(new LiteralText("Contains: " + e.getAmount() + "/" + e.getCapacity() + " J"), true); 31 | } 32 | 33 | return ActionResult.SUCCESS; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/MachineBlock.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockEntityProvider; 5 | import net.minecraft.block.BlockState; 6 | import net.minecraft.block.InventoryProvider; 7 | import net.minecraft.entity.LivingEntity; 8 | import net.minecraft.item.ItemPlacementContext; 9 | import net.minecraft.item.ItemStack; 10 | import net.minecraft.state.StateManager; 11 | import net.minecraft.state.property.DirectionProperty; 12 | import net.minecraft.state.property.Properties; 13 | import net.minecraft.util.math.BlockPos; 14 | import net.minecraft.util.math.Direction; 15 | import net.minecraft.world.World; 16 | 17 | public abstract class MachineBlock extends Block implements BlockEntityProvider { 18 | public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING; 19 | 20 | public MachineBlock(Block.Settings settings) { 21 | super(settings); 22 | setDefaultState(getStateManager().getDefaultState().with(FACING, Direction.NORTH)); 23 | } 24 | 25 | @Override 26 | public BlockState getPlacementState(ItemPlacementContext context) { 27 | return getDefaultState().with(FACING, context.getPlayerFacing().getOpposite()); 28 | } 29 | 30 | @Override 31 | protected void appendProperties(StateManager.Builder builder) { 32 | builder.add(FACING); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/entities/CrankBlockEntity.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.entities; 2 | 3 | import net.minecraft.block.entity.BlockEntity; 4 | import net.minecraft.nbt.CompoundTag; 5 | import net.minecraft.util.ActionResult; 6 | import net.minecraft.util.math.BlockPos; 7 | import team.teasanctuary.chemica.api.ICrankable; 8 | import team.teasanctuary.chemica.api.IEnergyStorage; 9 | import team.teasanctuary.chemica.api.IEnergyStorageHolder; 10 | import team.teasanctuary.chemica.registry.Blocks; 11 | 12 | public class CrankBlockEntity extends BlockEntity { 13 | public CrankBlockEntity() { 14 | super(Blocks.CRANK_BLOCK_ENTITY); 15 | } 16 | 17 | @Override 18 | public void fromTag(CompoundTag tag) { 19 | super.fromTag(tag); 20 | } 21 | 22 | @Override 23 | public CompoundTag toTag(CompoundTag tag) { 24 | return super.toTag(tag); 25 | } 26 | 27 | public ICrankable getCrankable() { 28 | if (world.isClient) return null; 29 | BlockPos p = new BlockPos(pos.getX(), pos.getY() - 1, pos.getZ()); 30 | return (ICrankable) world.getBlockEntity(p); 31 | } 32 | 33 | public ActionResult onPush() { 34 | ICrankable crankable = getCrankable(); 35 | if (crankable == null) return ActionResult.FAIL; 36 | if (!(crankable instanceof IEnergyStorageHolder)) return ActionResult.PASS; 37 | 38 | IEnergyStorage e = ((IEnergyStorageHolder) crankable).getEnergyStorage(); 39 | 40 | if (e.canReceive()) { 41 | e.receive(20, false); 42 | } 43 | return ActionResult.SUCCESS; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/blocks/EnergyBoxBlock.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.blocks; 2 | 3 | import team.teasanctuary.chemica.entities.EnergyBoxEntity; 4 | import net.fabricmc.fabric.api.container.ContainerProviderRegistry; 5 | import net.minecraft.block.Block; 6 | import net.minecraft.block.BlockEntityProvider; 7 | import net.minecraft.block.BlockState; 8 | import net.minecraft.block.entity.BlockEntity; 9 | import net.minecraft.entity.player.PlayerEntity; 10 | import net.minecraft.util.ActionResult; 11 | import net.minecraft.util.Hand; 12 | import net.minecraft.util.Identifier; 13 | import net.minecraft.util.hit.BlockHitResult; 14 | import net.minecraft.util.math.BlockPos; 15 | import net.minecraft.world.BlockView; 16 | import net.minecraft.world.World; 17 | 18 | public class EnergyBoxBlock extends Block implements BlockEntityProvider { 19 | public static final Identifier ID = new Identifier("chemica", "energy_box"); 20 | 21 | public EnergyBoxBlock(Settings settings) { 22 | super(settings); 23 | } 24 | 25 | @Override 26 | public BlockEntity createBlockEntity(BlockView view) { 27 | return new EnergyBoxEntity(); 28 | } 29 | 30 | @Override 31 | public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { 32 | BlockEntity be = world.getBlockEntity(pos); 33 | if (be instanceof EnergyBoxEntity) { 34 | ContainerProviderRegistry.INSTANCE.openContainer(EnergyBoxBlock.ID, player, (packetByteBuf -> packetByteBuf.writeBlockPos(pos))); 35 | } 36 | 37 | player.swingHand(Hand.MAIN_HAND); 38 | 39 | return ActionResult.SUCCESS; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/registry/Items.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.registry; 2 | 3 | import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; 4 | import net.minecraft.item.Item; 5 | import net.minecraft.item.ItemGroup; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.util.Identifier; 8 | import net.minecraft.util.registry.Registry; 9 | import team.teasanctuary.chemica.items.BatteryItem; 10 | import team.teasanctuary.chemica.items.ScrewdriverItem; 11 | import team.teasanctuary.chemica.items.TesterItem; 12 | 13 | public class Items { 14 | 15 | public static ScrewdriverItem SCREWDRIVER_ITEM; 16 | public static BatteryItem BATTERY_ITEM; 17 | public static TesterItem TESTER_ITEM; 18 | public static Item COKE_ITEM; 19 | 20 | public static final ItemGroup CHEMICA_ITEMS = FabricItemGroupBuilder.create( 21 | new Identifier("chemica", "items")) 22 | .icon(() -> new ItemStack(TESTER_ITEM)) 23 | .build(); 24 | 25 | public static void init() { 26 | SCREWDRIVER_ITEM = new ScrewdriverItem(new Item.Settings().maxCount(1).group(CHEMICA_ITEMS)); 27 | BATTERY_ITEM = new BatteryItem(new Item.Settings().maxCount(1).group(CHEMICA_ITEMS)); 28 | TESTER_ITEM = new TesterItem(new Item.Settings().maxCount(1).group(CHEMICA_ITEMS)); 29 | COKE_ITEM = new Item(new Item.Settings().group(CHEMICA_ITEMS)); 30 | 31 | register(); 32 | } 33 | 34 | private static void register() { 35 | Registry.register(Registry.ITEM, ScrewdriverItem.ID, SCREWDRIVER_ITEM); 36 | Registry.register(Registry.ITEM, BatteryItem.ID, BATTERY_ITEM); 37 | Registry.register(Registry.ITEM, TesterItem.ID, TESTER_ITEM); 38 | Registry.register(Registry.ITEM, new Identifier("chemica", "coke"), COKE_ITEM); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/items/BatteryItem.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.items; 2 | 3 | import net.fabricmc.api.EnvType; 4 | import net.fabricmc.api.Environment; 5 | import net.minecraft.client.item.TooltipContext; 6 | import net.minecraft.inventory.Inventories; 7 | import net.minecraft.item.Item; 8 | import net.minecraft.item.ItemStack; 9 | import net.minecraft.nbt.CompoundTag; 10 | import net.minecraft.text.Text; 11 | import net.minecraft.text.TranslatableText; 12 | import net.minecraft.util.DefaultedList; 13 | import net.minecraft.util.Identifier; 14 | import net.minecraft.world.World; 15 | import team.teasanctuary.chemica.api.*; 16 | 17 | import java.util.List; 18 | 19 | public class BatteryItem extends Item implements IItemEnergyStorageHolder { 20 | public static final Identifier ID = new Identifier("chemica", "battery"); 21 | public BatteryItem(Settings settings) { 22 | super(settings); 23 | } 24 | 25 | @Environment(EnvType.CLIENT) 26 | @Override 27 | public void appendTooltip(ItemStack stack, World world, List tooltip, TooltipContext context) { 28 | BatteryItem item = (BatteryItem) stack.getItem(); 29 | IEnergyStorage e = item.getEnergyStorage(stack); 30 | int amount = e.getAmount(); 31 | int capacity = e.getCapacity(); 32 | tooltip.add(new TranslatableText("chemica.tooltip.battery.stored", amount, capacity)); 33 | } 34 | 35 | @Override 36 | public IEnergyStorage getEnergyStorage(ItemStack stack) { 37 | EnergyStorage energy = new EnergyStorage(5000, true); 38 | Runnable listener = () -> { 39 | energy.saveToNBT(stack.getOrCreateTag()); 40 | }; 41 | 42 | if (!stack.hasTag() || !stack.getTag().contains("energy")) listener.run(); 43 | energy.writeFromNBT(stack.getTag()); 44 | return energy; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/gui/EnergyBoxController.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.gui; 2 | 3 | import io.github.cottonmc.cotton.gui.CottonCraftingController; 4 | import io.github.cottonmc.cotton.gui.widget.*; 5 | import io.github.cottonmc.cotton.gui.widget.data.Alignment; 6 | import net.minecraft.container.BlockContext; 7 | import net.minecraft.entity.player.PlayerInventory; 8 | import net.minecraft.recipe.RecipeType; 9 | import net.minecraft.util.Identifier; 10 | import team.teasanctuary.chemica.ClientMain; 11 | 12 | import java.util.function.Supplier; 13 | 14 | public class EnergyBoxController extends CottonCraftingController { 15 | public EnergyBoxController(int syncId, PlayerInventory playerInventory, BlockContext context) { 16 | super(null, syncId, playerInventory, getBlockInventory(context), getBlockPropertyDelegate(context)); 17 | 18 | WGridPanel root = new WGridPanel(); 19 | setRootPanel(root); 20 | root.setSize(90, 50); 21 | 22 | WLabel label = new WLabel("Battery Block"); 23 | label.setAlignment(Alignment.CENTER); 24 | 25 | root.add(label, 4, 0); 26 | 27 | // WDynamicLabel label2 = new WDynamicLabel(() -> String.valueOf(propertyDelegate.get(0))); 28 | // label.setAlignment(Alignment.CENTER); 29 | // 30 | // root.add(label2, 2, 2); 31 | 32 | WBar energyBar = new WBar(ClientMain.ENERGY_BAR_BG_TEXTURE, ClientMain.ENERGY_BAR_TEXTURE, 0, 1, WBar.Direction.UP); 33 | energyBar.withTooltip("chemica.tooltip.battery_block.energyTooltip"); 34 | energyBar.setProperties(propertyDelegate); 35 | 36 | root.add(energyBar, 4, 1, 1, 3); 37 | 38 | root.add(new WItemSlot(blockInventory, 0, 1, 1, false, true), 2, 2); 39 | root.add(new WItemSlot(blockInventory, 1, 1, 1, false, true), 6, 2); 40 | 41 | root.add(createPlayerInventoryPanel(), 0, 5); 42 | 43 | root.validate(this); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/gui/CrusherBlockController.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.gui; 2 | 3 | import io.github.cottonmc.cotton.gui.CottonCraftingController; 4 | import io.github.cottonmc.cotton.gui.widget.*; 5 | import io.github.cottonmc.cotton.gui.widget.data.Alignment; 6 | import io.netty.buffer.Unpooled; 7 | import net.fabricmc.fabric.api.network.ClientSidePacketRegistry; 8 | import net.minecraft.util.PacketByteBuf; 9 | import team.teasanctuary.chemica.ClientMain; 10 | import team.teasanctuary.chemica.entities.CrusherBlockEntity; 11 | import net.minecraft.block.entity.BlockEntity; 12 | import net.minecraft.container.BlockContext; 13 | import net.minecraft.entity.player.PlayerInventory; 14 | import net.minecraft.recipe.RecipeType; 15 | import net.minecraft.text.TranslatableText; 16 | 17 | public class CrusherBlockController extends CottonCraftingController { 18 | public CrusherBlockController(int syncId, PlayerInventory playerInventory, BlockContext context) { 19 | super(RecipeType.SMELTING, syncId, playerInventory, getBlockInventory(context), getBlockPropertyDelegate(context)); 20 | 21 | WGridPanel root = new WGridPanel(3); 22 | setRootPanel(root); 23 | //root.setSize(126, 50); 24 | 25 | WLabel label = new WLabel("Crusher"); 26 | label.setAlignment(Alignment.CENTER); 27 | 28 | root.add(label, (root.getWidth() / 2) * 3, 0); 29 | 30 | WItemSlot sourceSlot = WItemSlot.of(blockInventory, 0); 31 | root.add(sourceSlot, 4 * 3, 5); 32 | 33 | WItemSlot destSlot = WItemSlot.of(blockInventory, 1); 34 | root.add(destSlot, root.getWidth() - (16 * 3), 5); 35 | 36 | WBar progressBar = new WBar(null, null, 0, 1, WBar.Direction.RIGHT); 37 | progressBar.setProperties(propertyDelegate); 38 | root.add(progressBar, 6 * 3, 7, 17, 1); 39 | 40 | root.add(this.createPlayerInventoryPanel(), 0, 14); 41 | 42 | root.validate(this); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/MachineBlockEntity.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | import io.github.cottonmc.cotton.gui.PropertyDelegateHolder; 4 | import net.fabricmc.fabric.api.block.entity.BlockEntityClientSerializable; 5 | import net.minecraft.block.entity.BlockEntity; 6 | import net.minecraft.block.entity.BlockEntityType; 7 | import net.minecraft.container.PropertyDelegate; 8 | import net.minecraft.entity.player.PlayerEntity; 9 | import net.minecraft.inventory.Inventories; 10 | import net.minecraft.inventory.SidedInventory; 11 | import net.minecraft.item.ItemStack; 12 | import net.minecraft.nbt.CompoundTag; 13 | import net.minecraft.util.DefaultedList; 14 | import net.minecraft.util.Tickable; 15 | import net.minecraft.util.math.Direction; 16 | 17 | public abstract class MachineBlockEntity extends BlockEntity implements Tickable, ImplementedInventory, PropertyDelegateHolder, 18 | BlockEntityClientSerializable { 19 | 20 | protected final DefaultedList items; 21 | 22 | public MachineBlockEntity(BlockEntityType type, int invSize) { 23 | super(type); 24 | items = DefaultedList.ofSize(invSize, ItemStack.EMPTY); 25 | } 26 | 27 | @Override 28 | public CompoundTag toTag(CompoundTag tag) { 29 | Inventories.toTag(tag, items); 30 | return super.toTag(tag); 31 | } 32 | 33 | @Override 34 | public void fromTag(CompoundTag tag) { 35 | super.fromTag(tag); 36 | Inventories.fromTag(tag, items); 37 | } 38 | 39 | @Override 40 | public void fromClientTag(CompoundTag compoundTag) { 41 | fromTag(compoundTag); 42 | } 43 | 44 | @Override 45 | public CompoundTag toClientTag(CompoundTag compoundTag) { 46 | return toTag(compoundTag); 47 | } 48 | 49 | @Override 50 | public void tick() { 51 | 52 | } 53 | 54 | @Override 55 | public DefaultedList getItems() { 56 | return items; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/gui/StoneAlloySmelterController.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.gui; 2 | 3 | import io.github.cottonmc.cotton.gui.CottonCraftingController; 4 | import io.github.cottonmc.cotton.gui.widget.*; 5 | import io.github.cottonmc.cotton.gui.widget.data.Alignment; 6 | import net.minecraft.container.BlockContext; 7 | import net.minecraft.entity.player.PlayerInventory; 8 | import net.minecraft.recipe.RecipeType; 9 | import net.minecraft.text.TranslatableText; 10 | import team.teasanctuary.chemica.ClientMain; 11 | 12 | public class StoneAlloySmelterController extends CottonCraftingController { 13 | public StoneAlloySmelterController(int syncId, PlayerInventory playerInventory, BlockContext context) { 14 | super(RecipeType.SMELTING, syncId, playerInventory, getBlockInventory(context), getBlockPropertyDelegate(context)); 15 | 16 | WGridPanel root = new WGridPanel(); 17 | setRootPanel(root); 18 | 19 | WLabel label = new WLabel(new TranslatableText("block.chemica.stone_alloy_smelter")); 20 | label.setAlignment(Alignment.CENTER); 21 | root.add(label, 4, 0); 22 | 23 | // Slots 24 | root.add(new WItemSlot(blockInventory, 0, 1, 1, false, true), 1, 1); 25 | root.add(new WItemSlot(blockInventory, 1, 1, 1, false, true), 3, 1); 26 | 27 | root.add(new WItemSlot(blockInventory, 2, 1, 1, false, true), 2, 3); 28 | 29 | WBar fireBar = new WBar(ClientMain.FIRE_BAR_BG_TEXTURE, ClientMain.FIRE_BAR_TEXTURE,0, 1); 30 | root.add(fireBar, 2, 2); 31 | 32 | root.add(new WItemSlot(blockInventory, 3, 1, 1, true, true), 7, 2); 33 | // 34 | // Bars 35 | WBar energyBar = new WBar(ClientMain.PROGRESS_ARROW_BG_TEXTURE, ClientMain.PROGRESS_ARROW_TEXTURE, 2, 3, WBar.Direction.RIGHT); 36 | energyBar.withTooltip("chemica.tooltip.battery_block.energyTooltip"); 37 | root.add(energyBar, 4, 2, 2, 1); 38 | 39 | root.add(createPlayerInventoryPanel(), 0, 5); 40 | 41 | root.validate(this); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/blocks/CrusherBlock.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.blocks; 2 | 3 | import team.teasanctuary.chemica.ModMain; 4 | import team.teasanctuary.chemica.api.MachineBlock; 5 | import team.teasanctuary.chemica.entities.CrusherBlockEntity; 6 | import net.fabricmc.fabric.api.container.ContainerProviderRegistry; 7 | import net.minecraft.block.Block; 8 | import net.minecraft.block.BlockEntityProvider; 9 | import net.minecraft.block.BlockState; 10 | import net.minecraft.block.entity.BlockEntity; 11 | import net.minecraft.entity.player.PlayerEntity; 12 | import net.minecraft.inventory.Inventory; 13 | import net.minecraft.util.ActionResult; 14 | import net.minecraft.util.Hand; 15 | import net.minecraft.util.Identifier; 16 | import net.minecraft.util.hit.BlockHitResult; 17 | import net.minecraft.util.math.BlockPos; 18 | import net.minecraft.world.BlockView; 19 | import net.minecraft.world.World; 20 | 21 | public class CrusherBlock extends MachineBlock { 22 | public static final Identifier ID = new Identifier("chemica", "crusher"); 23 | 24 | public CrusherBlock(Settings settings) { 25 | super(settings); 26 | } 27 | 28 | @Override 29 | public BlockEntity createBlockEntity(BlockView view) { 30 | return new CrusherBlockEntity(); 31 | } 32 | 33 | @Override 34 | public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { 35 | if (world.isClient) return ActionResult.SUCCESS; 36 | 37 | 38 | BlockEntity be = world.getBlockEntity(pos); 39 | 40 | if (be instanceof CrusherBlockEntity) { 41 | ContainerProviderRegistry.INSTANCE.openContainer(CrusherBlock.ID, player, (packetByteBuf -> packetByteBuf.writeBlockPos(pos))); 42 | } 43 | 44 | Inventory i = (Inventory) world.getBlockEntity(pos); 45 | System.out.println("The first slot holds " 46 | + i.getInvStack(0) + " and the second slot holds " + i.getInvStack(1)); 47 | 48 | player.swingHand(Hand.MAIN_HAND); 49 | 50 | return ActionResult.SUCCESS; 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/gui/SolidFuelGeneratorController.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.gui; 2 | 3 | import io.github.cottonmc.cotton.gui.CottonCraftingController; 4 | import io.github.cottonmc.cotton.gui.widget.*; 5 | import io.github.cottonmc.cotton.gui.widget.data.Alignment; 6 | import net.minecraft.container.BlockContext; 7 | import net.minecraft.container.PropertyDelegate; 8 | import net.minecraft.entity.player.PlayerInventory; 9 | import net.minecraft.inventory.Inventory; 10 | import net.minecraft.recipe.RecipeType; 11 | import net.minecraft.state.property.BooleanProperty; 12 | import net.minecraft.text.TranslatableText; 13 | import team.teasanctuary.chemica.ClientMain; 14 | 15 | public class SolidFuelGeneratorController extends CottonCraftingController { 16 | public SolidFuelGeneratorController(int syncId, PlayerInventory playerInventory, BlockContext context) { 17 | super(RecipeType.SMELTING, syncId, playerInventory, getBlockInventory(context), getBlockPropertyDelegate(context)); 18 | 19 | WGridPanel root = new WGridPanel(); 20 | setRootPanel(root); 21 | 22 | WLabel label = new WLabel(new TranslatableText("block.chemica.solid_fuel_generator")); 23 | label.setAlignment(Alignment.CENTER); 24 | root.add(label, 4, 0); 25 | 26 | // Slots 27 | root.add(new WItemSlot(blockInventory, 0, 1, 1, false, true), 2, 1); 28 | WSprite sprite = new WSprite(ClientMain.SECONDARY_PRODUCT_ARROW); 29 | root.add(sprite, 2, 2); 30 | root.add(new WItemSlot(blockInventory, 1, 1, 1, false, false), 2, 3); 31 | 32 | WBar fireBar = new WBar(ClientMain.FIRE_BAR_BG_TEXTURE, ClientMain.FIRE_BAR_TEXTURE,2, 3); 33 | root.add(fireBar, 4, 2); 34 | 35 | // Bars 36 | WBar energyBar = new WBar(ClientMain.ENERGY_BAR_BG_TEXTURE, ClientMain.ENERGY_BAR_TEXTURE, 0, 1, WBar.Direction.UP); 37 | energyBar.withTooltip("chemica.tooltip.battery_block.energyTooltip"); 38 | root.add(energyBar, 6, 1, 1, 3); 39 | 40 | root.add(createPlayerInventoryPanel(), 0, 5); 41 | 42 | root.validate(this); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/gui/BeehiveOvenController.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.gui; 2 | 3 | import io.github.cottonmc.cotton.gui.CottonCraftingController; 4 | import io.github.cottonmc.cotton.gui.widget.WBar; 5 | import io.github.cottonmc.cotton.gui.widget.WGridPanel; 6 | import io.github.cottonmc.cotton.gui.widget.WItemSlot; 7 | import io.github.cottonmc.cotton.gui.widget.WLabel; 8 | import io.github.cottonmc.cotton.gui.widget.data.Alignment; 9 | import net.minecraft.client.resource.language.I18n; 10 | import net.minecraft.container.BlockContext; 11 | import net.minecraft.entity.player.PlayerInventory; 12 | import net.minecraft.util.Identifier; 13 | import team.teasanctuary.chemica.ModMain; 14 | import team.teasanctuary.chemica.api.WToggle; 15 | 16 | public class BeehiveOvenController extends CottonCraftingController { 17 | public BeehiveOvenController(int syncId, PlayerInventory playerInventory, BlockContext context) { 18 | super(ModMain.BEEHIVE_OVEN_RECIPE_TYPE, syncId, playerInventory, getBlockInventory(context), getBlockPropertyDelegate(context)); 19 | 20 | WGridPanel root = new WGridPanel(1); 21 | setRootPanel(root); 22 | 23 | WLabel label = new WLabel(I18n.translate("label.chemica.beehive_oven")); 24 | label.setAlignment(Alignment.CENTER); 25 | root.add(label, 81, 0); 26 | 27 | root.add(WItemSlot.of(blockInventory, 0), 36, 36); 28 | root.add(WItemSlot.outputOf(blockInventory, 1), 108, 36); 29 | 30 | WBar tempBar = new WBar(new Identifier("chemica", "textures/gui/temperature_bg.png"), 31 | new Identifier("chemica", "textures/gui/temperature_fg.png"),1, 2, WBar.Direction.UP); 32 | tempBar.withTooltip("chemica.tooltip.beehive_oven.temperatureTooltip"); 33 | root.add(tempBar, 152, 12, 9, 66); 34 | 35 | WBar progressBar = new WBar(new Identifier("chemica", "textures/gui/fire_bar_bg.png"), 36 | new Identifier("chemica", "textures/gui/fire_bar_fg.png"), 37 | 3, 4, WBar.Direction.UP); 38 | root.add(progressBar, 72, 36, 18, 18); 39 | 40 | WToggle completeToggle = new WToggle(new Identifier("chemica", "textures/gui/toggle.png"), 32, 16, 16, 0); 41 | completeToggle.withTooltips("chemica.tooltip.beehive_oven.not_complete", "chemica.tooltip.beehive_oven.complete"); 42 | root.add(completeToggle, 0, 72); 43 | 44 | root.add(createPlayerInventoryPanel(), 0, 90); 45 | 46 | root.validate(this); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/block/crank.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "textures": { 4 | "2": "block/brown_wool", 5 | "3": "block/oak_planks" 6 | }, 7 | "elements": [ 8 | { 9 | "from": [7, 0, 7], 10 | "to": [9, 6, 9], 11 | "rotation": {"angle": 0, "axis": "z", "origin": [7, -3, 16]}, 12 | "faces": { 13 | "north": {"uv": [0, 0, 9, 2], "rotation": 270, "texture": "#3"}, 14 | "east": {"uv": [0, 0, 9, 2], "rotation": 90, "texture": "#3"}, 15 | "south": {"uv": [0, 0, 9, 2], "rotation": 90, "texture": "#3"}, 16 | "west": {"uv": [0, 0, 9, 2], "rotation": 90, "texture": "#3"}, 17 | "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"}, 18 | "down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"} 19 | } 20 | }, 21 | { 22 | "from": [14, 4, 7], 23 | "to": [16, 8, 9], 24 | "rotation": {"angle": 0, "axis": "z", "origin": [7, -3, 16]}, 25 | "faces": { 26 | "north": {"uv": [0, 0, 4, 2], "rotation": 270, "texture": "#3"}, 27 | "east": {"uv": [0, 0, 4, 2], "rotation": 90, "texture": "#3"}, 28 | "south": {"uv": [0, 0, 4, 2], "rotation": 90, "texture": "#3"}, 29 | "west": {"uv": [0, 0, 4, 2], "rotation": 90, "texture": "#3"}, 30 | "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"}, 31 | "down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"} 32 | } 33 | }, 34 | { 35 | "from": [14, 8, 7], 36 | "to": [16, 13, 9], 37 | "rotation": {"angle": 0, "axis": "z", "origin": [7, -3, 16]}, 38 | "faces": { 39 | "north": {"uv": [0, 0, 5, 2], "rotation": 270, "texture": "#2"}, 40 | "east": {"uv": [0, 0, 5, 2], "rotation": 90, "texture": "#2"}, 41 | "south": {"uv": [0, 0, 5, 2], "rotation": 90, "texture": "#2"}, 42 | "west": {"uv": [0, 0, 5, 2], "rotation": 90, "texture": "#2"}, 43 | "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#2"}, 44 | "down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#2"} 45 | } 46 | }, 47 | { 48 | "from": [9, 4, 7], 49 | "to": [14, 6, 9], 50 | "rotation": {"angle": 0, "axis": "z", "origin": [7, -3, 16]}, 51 | "faces": { 52 | "north": {"uv": [0, 0, 2, 5], "rotation": 270, "texture": "#3"}, 53 | "east": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"}, 54 | "south": {"uv": [0, 0, 2, 5], "rotation": 90, "texture": "#3"}, 55 | "west": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"}, 56 | "up": {"uv": [0, 0, 2, 5], "rotation": 90, "texture": "#3"}, 57 | "down": {"uv": [0, 0, 2, 5], "rotation": 90, "texture": "#3"} 58 | } 59 | } 60 | ], 61 | "groups": [ 62 | { 63 | "name": "ruchka", 64 | "origin": [8, 8, 8], 65 | "children": [0, 1, 2, 3] 66 | } 67 | ] 68 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/entities/BasicWireBlockEntity.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.entities; 2 | 3 | import net.minecraft.block.entity.BlockEntity; 4 | import net.minecraft.block.entity.BlockEntityType; 5 | import net.minecraft.container.PropertyDelegate; 6 | import net.minecraft.util.math.Direction; 7 | import team.teasanctuary.chemica.api.IEnergyStorageHolder; 8 | import team.teasanctuary.chemica.api.MachineBlockWithEnergy; 9 | import team.teasanctuary.chemica.blocks.BasicWireBlock; 10 | import team.teasanctuary.chemica.registry.Blocks; 11 | 12 | public class BasicWireBlockEntity extends MachineBlockWithEnergy { 13 | public BasicWireBlockEntity() { 14 | super(Blocks.BASIC_WIRE_BLOCK_ENTITY, 500, true, 0); 15 | } 16 | 17 | @Override 18 | public PropertyDelegate getPropertyDelegate() { 19 | return null; 20 | } 21 | 22 | @Override 23 | public void tick() { 24 | // if (getCachedState().get(BasicWireBlock.CONNECTED_DOWN)) { 25 | //// BlockEntity be = world.getBlockEntity(pos.offset(Direction.DOWN)); 26 | //// if (be instanceof IEnergyStorageHolder) { 27 | //// energy.to((((IEnergyStorageHolder) be).getEnergyStorage()), 64); 28 | //// } 29 | //// } 30 | //// 31 | //// if (getCachedState().get(BasicWireBlock.CONNECTED_UP)) { 32 | //// BlockEntity be = world.getBlockEntity(pos.offset(Direction.UP)); 33 | //// if (be instanceof IEnergyStorageHolder) { 34 | //// energy.to((((IEnergyStorageHolder) be).getEnergyStorage()), 64); 35 | //// } 36 | //// } 37 | //// 38 | //// if (getCachedState().get(BasicWireBlock.CONNECTED_EAST)) { 39 | //// BlockEntity be = world.getBlockEntity(pos.offset(Direction.EAST)); 40 | //// if (be instanceof IEnergyStorageHolder) { 41 | //// energy.to((((IEnergyStorageHolder) be).getEnergyStorage()), 64); 42 | //// } 43 | //// } 44 | //// 45 | //// if (getCachedState().get(BasicWireBlock.CONNECTED_WEST)) { 46 | //// BlockEntity be = world.getBlockEntity(pos.offset(Direction.WEST)); 47 | //// if (be instanceof IEnergyStorageHolder) { 48 | //// energy.to((((IEnergyStorageHolder) be).getEnergyStorage()), 64); 49 | //// } 50 | //// } 51 | //// 52 | //// if (getCachedState().get(BasicWireBlock.CONNECTED_NORTH)) { 53 | //// BlockEntity be = world.getBlockEntity(pos.offset(Direction.NORTH)); 54 | //// if (be instanceof IEnergyStorageHolder) { 55 | //// energy.to((((IEnergyStorageHolder) be).getEnergyStorage()), 64); 56 | //// } 57 | //// } 58 | energy.emitEnergy(this, world, pos, 64); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/models/item/crank.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "textures": { 4 | "2": "block/brown_wool", 5 | "3": "block/oak_planks" 6 | }, 7 | "elements": [ 8 | { 9 | "from": [7, 0, 7], 10 | "to": [9, 9, 9], 11 | "rotation": {"angle": 0, "axis": "z", "origin": [7, 0, 16]}, 12 | "faces": { 13 | "north": {"uv": [0, 0, 9, 2], "rotation": 270, "texture": "#3"}, 14 | "east": {"uv": [0, 0, 9, 2], "rotation": 90, "texture": "#3"}, 15 | "south": {"uv": [0, 0, 9, 2], "rotation": 90, "texture": "#3"}, 16 | "west": {"uv": [0, 0, 9, 2], "rotation": 90, "texture": "#3"}, 17 | "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"}, 18 | "down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"} 19 | } 20 | }, 21 | { 22 | "from": [14, 7, 7], 23 | "to": [16, 11, 9], 24 | "rotation": {"angle": 0, "axis": "z", "origin": [7, 0, 16]}, 25 | "faces": { 26 | "north": {"uv": [0, 0, 4, 2], "rotation": 270, "texture": "#3"}, 27 | "east": {"uv": [0, 0, 4, 2], "rotation": 90, "texture": "#3"}, 28 | "south": {"uv": [0, 0, 4, 2], "rotation": 90, "texture": "#3"}, 29 | "west": {"uv": [0, 0, 4, 2], "rotation": 90, "texture": "#3"}, 30 | "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"}, 31 | "down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"} 32 | } 33 | }, 34 | { 35 | "from": [14, 11, 7], 36 | "to": [16, 16, 9], 37 | "rotation": {"angle": 0, "axis": "z", "origin": [7, 0, 16]}, 38 | "faces": { 39 | "north": {"uv": [0, 0, 5, 2], "rotation": 270, "texture": "#2"}, 40 | "east": {"uv": [0, 0, 5, 2], "rotation": 90, "texture": "#2"}, 41 | "south": {"uv": [0, 0, 5, 2], "rotation": 90, "texture": "#2"}, 42 | "west": {"uv": [0, 0, 5, 2], "rotation": 90, "texture": "#2"}, 43 | "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#2"}, 44 | "down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#2"} 45 | } 46 | }, 47 | { 48 | "from": [9, 7, 7], 49 | "to": [14, 9, 9], 50 | "rotation": {"angle": 0, "axis": "z", "origin": [7, 0, 16]}, 51 | "faces": { 52 | "north": {"uv": [0, 0, 2, 5], "rotation": 270, "texture": "#3"}, 53 | "east": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"}, 54 | "south": {"uv": [0, 0, 2, 5], "rotation": 90, "texture": "#3"}, 55 | "west": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#3"}, 56 | "up": {"uv": [0, 0, 2, 5], "rotation": 90, "texture": "#3"}, 57 | "down": {"uv": [0, 0, 2, 5], "rotation": 90, "texture": "#3"} 58 | } 59 | } 60 | ], 61 | "groups": [ 62 | { 63 | "name": "ruchka", 64 | "origin": [8, 8, 8], 65 | "children": [0, 1, 2, 3] 66 | } 67 | ] 68 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/WToggle.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | import blue.endless.jankson.annotation.Nullable; 4 | import io.github.cottonmc.cotton.gui.GuiDescription; 5 | import io.github.cottonmc.cotton.gui.client.ScreenDrawing; 6 | import io.github.cottonmc.cotton.gui.widget.WWidget; 7 | import net.fabricmc.api.EnvType; 8 | import net.fabricmc.api.Environment; 9 | import net.minecraft.client.resource.language.I18n; 10 | import net.minecraft.container.PropertyDelegate; 11 | import net.minecraft.util.Identifier; 12 | 13 | import java.util.List; 14 | 15 | public class WToggle extends WWidget { 16 | protected PropertyDelegate properties; 17 | private final Identifier imageID; 18 | private final int elementWidth, elementHeight; 19 | private final float uvOffsetX; 20 | private String[] toggleTooltip = new String[2]; 21 | 22 | private final int state; 23 | 24 | public WToggle(Identifier imageID, int textureWidth, int elementWidth, int elementHeight, int state) { 25 | this.imageID = imageID; 26 | this.elementWidth = elementWidth; 27 | this.elementHeight = elementHeight; 28 | this.uvOffsetX = (float) elementWidth / textureWidth; 29 | this.state = state; 30 | } 31 | 32 | public boolean canResize() { 33 | return false; 34 | } 35 | 36 | public int getWidth() { 37 | return elementWidth; 38 | } 39 | 40 | public int getHeight() { 41 | return elementHeight; 42 | } 43 | 44 | public boolean getState() { 45 | return this.properties.get(state) == 1; 46 | } 47 | 48 | @Environment(EnvType.CLIENT) 49 | public void paintBackground(int x, int y) { 50 | boolean st = getState(); 51 | ScreenDrawing.texturedRect(x, y, elementWidth, elementHeight, imageID, uvOffsetX * (st ? 1 : 0), .0f, uvOffsetX * (st ? 2 : 1), 1.f, -1); 52 | } 53 | 54 | public void createPeers(GuiDescription c) { 55 | if (this.properties == null) { 56 | this.properties = c.getPropertyDelegate(); 57 | } 58 | 59 | } 60 | 61 | @Nullable 62 | public PropertyDelegate getProperties() { 63 | return this.properties; 64 | } 65 | 66 | public WToggle setProperties(PropertyDelegate properties) { 67 | this.properties = properties; 68 | return this; 69 | } 70 | 71 | public WToggle withTooltips(String falseTooltip, String trueTooltip) { 72 | this.toggleTooltip = new String[]{falseTooltip, trueTooltip}; 73 | return this; 74 | } 75 | 76 | @Override 77 | public void addInformation(List information) { 78 | String tooltipLabel = this.toggleTooltip[(getState()) ? 1 : 0]; 79 | if (tooltipLabel == null) 80 | return; 81 | 82 | String translated = I18n.translate(tooltipLabel); 83 | 84 | information.add(translated); 85 | } 86 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/recipes/GeneratorRecipe.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.recipes; 2 | 3 | import com.google.gson.JsonObject; 4 | import net.minecraft.inventory.Inventory; 5 | import net.minecraft.item.ItemStack; 6 | import net.minecraft.recipe.Ingredient; 7 | import net.minecraft.recipe.Recipe; 8 | import net.minecraft.recipe.RecipeSerializer; 9 | import net.minecraft.recipe.RecipeType; 10 | import net.minecraft.util.Identifier; 11 | import net.minecraft.util.JsonHelper; 12 | import net.minecraft.util.PacketByteBuf; 13 | import net.minecraft.world.World; 14 | import team.teasanctuary.chemica.ModMain; 15 | 16 | public class GeneratorRecipe implements Recipe { 17 | public static final Identifier ID = new Identifier("chemica", "generator_recipe"); 18 | public static final GeneratorRecipe.Serializer SERIALIZER = new GeneratorRecipe.Serializer(); 19 | 20 | private final Identifier id; 21 | private final Ingredient input; 22 | private final int burnTime; 23 | 24 | public GeneratorRecipe(Identifier id, Ingredient input, int output) { 25 | this.id = id; 26 | this.input = input; 27 | this.burnTime = output; 28 | } 29 | 30 | @Override 31 | public boolean matches(Inventory inv, World world) { 32 | return this.input.test(inv.getInvStack(0)); 33 | } 34 | 35 | public int getBurnTime() { return burnTime; } 36 | 37 | @Override 38 | public ItemStack craft(Inventory inv) { 39 | return null; 40 | } 41 | 42 | @Override 43 | public boolean fits(int width, int height) { 44 | return true; 45 | } 46 | 47 | @Override 48 | public ItemStack getOutput() { 49 | return ItemStack.EMPTY; 50 | } 51 | 52 | @Override 53 | public Identifier getId() { 54 | return this.id; 55 | } 56 | 57 | @Override 58 | public RecipeSerializer getSerializer() { 59 | return SERIALIZER; 60 | } 61 | 62 | @Override 63 | public RecipeType getType() { 64 | return ModMain.GENERATOR_RECIPE; 65 | } 66 | 67 | private static class Serializer implements RecipeSerializer { 68 | Serializer() { 69 | } 70 | 71 | @Override 72 | public GeneratorRecipe read(Identifier id, JsonObject json) { 73 | Ingredient input = Ingredient.fromJson(JsonHelper.getObject(json, "ingredient")); 74 | int output = JsonHelper.getInt(json, "burnTime"); 75 | return new GeneratorRecipe(id, input, output); 76 | } 77 | 78 | @Override 79 | public GeneratorRecipe read(Identifier id, PacketByteBuf buf) { 80 | Ingredient input = Ingredient.fromPacket(buf); 81 | int output = buf.readInt(); 82 | return new GeneratorRecipe(id, input, output); 83 | } 84 | 85 | @Override 86 | public void write(PacketByteBuf buf, GeneratorRecipe recipe) { 87 | recipe.input.write(buf); 88 | buf.writeInt(recipe.burnTime); 89 | } 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/EnergyStorage.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | import net.minecraft.block.entity.BlockEntity; 4 | import net.minecraft.nbt.CompoundTag; 5 | import net.minecraft.util.math.BlockPos; 6 | import net.minecraft.util.math.Direction; 7 | import net.minecraft.world.World; 8 | 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | import java.util.concurrent.atomic.AtomicInteger; 12 | 13 | public class EnergyStorage implements IEnergyStorage { 14 | 15 | public int energy = 0; 16 | private int capacity; 17 | private boolean receive; 18 | 19 | public EnergyStorage(int cap, boolean canReceive) { 20 | this.capacity = cap; 21 | this.receive = canReceive; 22 | } 23 | 24 | public void saveToNBT(CompoundTag tag) { 25 | tag.putInt("energy", energy); 26 | tag.putInt("capacity", capacity); 27 | tag.putBoolean("receive", receive); 28 | } 29 | 30 | public void writeFromNBT(CompoundTag tag) { 31 | energy = tag.getInt("energy"); 32 | capacity = tag.getInt("capacity"); 33 | receive = tag.getBoolean("receive"); 34 | } 35 | 36 | @Override 37 | public int getAmount() { 38 | return energy; 39 | } 40 | 41 | @Override 42 | public int getCapacity() { 43 | return capacity; 44 | } 45 | 46 | @Override 47 | public boolean canReceive() { return receive; } 48 | 49 | public void setReceive(boolean v) { receive = v; } 50 | public void setEnergy(int v) { energy = v; } 51 | public void setCapacity(int v) { capacity = v; } 52 | 53 | public void emitEnergy(IEnergyStorageHolder from, World world, BlockPos pos, int transferSize) { 54 | if (from.getEnergyStorage().getAmount() == 0) return; 55 | 56 | List targets = new ArrayList<>(); 57 | for (Direction direction : Direction.values()) { 58 | BlockEntity be = world.getBlockEntity(pos.offset(direction)); 59 | if (be instanceof IEnergyStorageHolder && !(be instanceof IEnergyProvider)) { 60 | targets.add((IEnergyStorageHolder) be); 61 | } 62 | } 63 | 64 | if (targets.size() == 0) return; 65 | if (transferSize % targets.size() != 0) return; 66 | 67 | AtomicInteger finalTransferSize = new AtomicInteger(transferSize / targets.size()); 68 | targets.forEach(to -> from.getEnergyStorage().to(to.getEnergyStorage(), finalTransferSize.get())); 69 | } 70 | 71 | @Override 72 | public int extract(int n, boolean sim) { 73 | if (n > 0) { 74 | if (n > energy) 75 | n = energy; 76 | if (!sim) 77 | energy -= n; 78 | } 79 | return n; 80 | } 81 | 82 | @Override 83 | public int receive(int n, boolean sim) { 84 | if (n > 0) { 85 | final int r = capacity - energy; 86 | if (n > r) 87 | n = r; 88 | if (!sim) 89 | energy += n; 90 | } 91 | return n; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/entities/EnergyBoxEntity.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.entities; 2 | 3 | import io.github.cottonmc.cotton.gui.PropertyDelegateHolder; 4 | import net.minecraft.item.Item; 5 | import net.minecraft.item.ItemStack; 6 | import team.teasanctuary.chemica.ModMain; 7 | import team.teasanctuary.chemica.api.*; 8 | import net.minecraft.block.entity.BlockEntity; 9 | import net.minecraft.container.PropertyDelegate; 10 | import team.teasanctuary.chemica.registry.Blocks; 11 | 12 | public class EnergyBoxEntity extends MachineBlockWithEnergy { 13 | 14 | private final int transferRate = 60; 15 | 16 | public EnergyBoxEntity() { 17 | super(Blocks.ENERGY_BOX_ENTITY, 500000, true, 2); 18 | } 19 | 20 | @Override 21 | public PropertyDelegate getPropertyDelegate() { 22 | return new PropertyDelegate() { 23 | @Override 24 | public int get(int index) { 25 | switch (index) { 26 | // energy 27 | case 0: return energy.getAmount(); 28 | // capacity 29 | case 1: return energy.getCapacity(); 30 | default: return 0; 31 | } 32 | } 33 | 34 | @Override 35 | public void set(int index, int value) { 36 | switch (index) { 37 | // energy 38 | case 0: 39 | energy.setEnergy(value); 40 | break; 41 | // capacity 42 | case 1: 43 | energy.setCapacity(value); 44 | break; 45 | } 46 | } 47 | 48 | @Override 49 | public int size() { 50 | return 2; 51 | } 52 | }; 53 | } 54 | 55 | @Override 56 | public void tick() { 57 | super.tick(); 58 | 59 | if (!world.isClient) { 60 | ItemStack chargable = getInvStack(0); 61 | ItemStack dischargable = getInvStack(1); 62 | 63 | if (!chargable.isEmpty()) { 64 | Item item = chargable.getItem(); 65 | 66 | if (item instanceof IItemEnergyStorageHolder) { 67 | if (((IItemEnergyStorageHolder) item).getEnergyStorage(chargable).getAmount() < ((IItemEnergyStorageHolder) item).getEnergyStorage(chargable).getCapacity()) 68 | energy.to(((IItemEnergyStorageHolder) item).getEnergyStorage(chargable), transferRate); 69 | } 70 | } 71 | 72 | if (!dischargable.isEmpty()) { 73 | Item item = dischargable.getItem(); 74 | 75 | if (item instanceof IItemEnergyStorageHolder) { 76 | if (((IItemEnergyStorageHolder) item).getEnergyStorage(dischargable).getAmount() > 0) { 77 | ((IItemEnergyStorageHolder) item).getEnergyStorage(dischargable).to(this.getEnergyStorage(), transferRate); 78 | } 79 | } 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/blocks/StoneAlloySmelterBlock.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.blocks; 2 | 3 | import net.fabricmc.fabric.api.container.ContainerProviderRegistry; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.block.BlockState; 6 | import net.minecraft.block.entity.BlockEntity; 7 | import net.minecraft.entity.player.PlayerEntity; 8 | import net.minecraft.inventory.Inventory; 9 | import net.minecraft.state.StateManager; 10 | import net.minecraft.state.property.BooleanProperty; 11 | import net.minecraft.util.ActionResult; 12 | import net.minecraft.util.Hand; 13 | import net.minecraft.util.Identifier; 14 | import net.minecraft.util.ItemScatterer; 15 | import net.minecraft.util.hit.BlockHitResult; 16 | import net.minecraft.util.math.BlockPos; 17 | import net.minecraft.world.BlockView; 18 | import net.minecraft.world.World; 19 | import team.teasanctuary.chemica.api.MachineBlock; 20 | import team.teasanctuary.chemica.entities.SolidFuelGeneratorEntity; 21 | import team.teasanctuary.chemica.entities.StoneAlloySmelterEntity; 22 | 23 | public class StoneAlloySmelterBlock extends MachineBlock { 24 | public static final Identifier ID = new Identifier("chemica", "stone_alloy_smelter"); 25 | 26 | public static final BooleanProperty BURNING = BooleanProperty.of("burning"); 27 | 28 | public StoneAlloySmelterBlock(Settings settings) { 29 | super(settings); 30 | setDefaultState(getStateManager().getDefaultState().with(BURNING, false)); 31 | } 32 | 33 | @Override 34 | public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { 35 | if (world.isClient) return ActionResult.SUCCESS; 36 | 37 | BlockEntity be = world.getBlockEntity(pos); 38 | 39 | if (be instanceof StoneAlloySmelterEntity) { 40 | ContainerProviderRegistry.INSTANCE.openContainer(StoneAlloySmelterBlock.ID, player, (packetByteBuf -> packetByteBuf.writeBlockPos(pos))); 41 | } 42 | 43 | Inventory i = (Inventory) world.getBlockEntity(pos); 44 | System.out.println("The first slot holds " 45 | + i.getInvStack(0) + " and the second slot holds " + i.getInvStack(1)); 46 | 47 | player.swingHand(Hand.MAIN_HAND); 48 | 49 | return ActionResult.SUCCESS; 50 | } 51 | 52 | @Override 53 | public void onBlockRemoved(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) { 54 | if (state.getBlock() != newState.getBlock()) { 55 | BlockEntity blockEntity = world.getBlockEntity(pos); 56 | if (blockEntity instanceof StoneAlloySmelterEntity) { 57 | ItemScatterer.spawn(world, (BlockPos)pos, (Inventory)((StoneAlloySmelterEntity)blockEntity)); 58 | world.updateHorizontalAdjacent(pos, this); 59 | } 60 | 61 | super.onBlockRemoved(state, world, pos, newState, moved); 62 | } 63 | } 64 | 65 | @Override 66 | protected void appendProperties(StateManager.Builder builder) { 67 | super.appendProperties(builder); 68 | builder.add(BURNING); 69 | } 70 | 71 | @Override 72 | public BlockEntity createBlockEntity(BlockView view) { 73 | return new StoneAlloySmelterEntity(); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto init 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto init 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :init 68 | @rem Get command-line arguments, handling Windows variants 69 | 70 | if not "%OS%" == "Windows_NT" goto win9xME_args 71 | 72 | :win9xME_args 73 | @rem Slurp the command line arguments. 74 | set CMD_LINE_ARGS= 75 | set _SKIP=2 76 | 77 | :win9xME_args_slurp 78 | if "x%~1" == "x" goto execute 79 | 80 | set CMD_LINE_ARGS=%* 81 | 82 | :execute 83 | @rem Setup the command line 84 | 85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 86 | 87 | @rem Execute Gradle 88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 89 | 90 | :end 91 | @rem End local scope for the variables with windows NT shell 92 | if "%ERRORLEVEL%"=="0" goto mainEnd 93 | 94 | :fail 95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 96 | rem the _cmd.exe /c_ return code! 97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 98 | exit /b 1 99 | 100 | :mainEnd 101 | if "%OS%"=="Windows_NT" endlocal 102 | 103 | :omega 104 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/blocks/CrankBlock.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.blocks; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockEntityProvider; 5 | import net.minecraft.block.BlockState; 6 | import net.minecraft.block.HorizontalFacingBlock; 7 | import net.minecraft.block.entity.BlockEntity; 8 | import net.minecraft.entity.player.PlayerEntity; 9 | import net.minecraft.item.ItemPlacementContext; 10 | import net.minecraft.state.StateManager; 11 | import net.minecraft.state.property.Properties; 12 | import net.minecraft.util.ActionResult; 13 | import net.minecraft.util.Hand; 14 | import net.minecraft.util.Identifier; 15 | import net.minecraft.util.hit.BlockHitResult; 16 | import net.minecraft.util.math.BlockPos; 17 | import net.minecraft.util.math.Direction; 18 | import net.minecraft.world.BlockView; 19 | import net.minecraft.world.World; 20 | import team.teasanctuary.chemica.api.ICrankable; 21 | import team.teasanctuary.chemica.entities.CrankBlockEntity; 22 | 23 | public class CrankBlock extends HorizontalFacingBlock implements BlockEntityProvider { 24 | public static final Identifier ID = new Identifier("chemica", "crank"); 25 | 26 | public CrankBlock(Settings settings) { 27 | super(settings); 28 | setDefaultState(this.stateManager.getDefaultState().with(Properties.HORIZONTAL_FACING, Direction.NORTH)); 29 | } 30 | 31 | @Override 32 | protected void appendProperties(StateManager.Builder stateManager) { 33 | stateManager.add(Properties.HORIZONTAL_FACING); 34 | } 35 | 36 | @Override 37 | public BlockState getPlacementState(ItemPlacementContext ctx) { 38 | return this.getDefaultState().with(FACING, ctx.getPlayerFacing()); 39 | } 40 | 41 | private void rotateCrank(World world, BlockPos pos, BlockState state) { 42 | Direction dir = Direction.fromHorizontal((state.get(FACING).getHorizontal() + 1) % 4); 43 | world.setBlockState(pos, state.with(FACING, dir)); 44 | } 45 | 46 | @Override 47 | public BlockEntity createBlockEntity(BlockView view) { 48 | return new CrankBlockEntity(); 49 | } 50 | 51 | @Override 52 | public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean moved) { 53 | super.onBlockAdded(state, world, pos, oldState, moved); 54 | BlockEntity be = world.getBlockEntity(new BlockPos(pos.getX(), pos.getY() - 1, pos.getZ())); 55 | 56 | if (be instanceof ICrankable) { 57 | return; 58 | } 59 | 60 | world.breakBlock(pos, true); 61 | } 62 | 63 | @Override 64 | public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) { 65 | super.onBreak(world, pos, state, player); 66 | } 67 | 68 | @Override 69 | public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { 70 | System.out.println("used crank"); 71 | if (world.isClient) return ActionResult.SUCCESS; 72 | 73 | CrankBlockEntity be = (CrankBlockEntity) world.getBlockEntity(pos); 74 | assert be != null; 75 | rotateCrank(world, pos, state); 76 | return be.onPush(); 77 | } 78 | 79 | @Override 80 | public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos neighborPos, boolean moved) { 81 | super.neighborUpdate(state, world, pos, block, neighborPos, moved); 82 | if (neighborPos.equals(new BlockPos(pos.getX(), pos.getY() - 1, pos.getZ()))) { 83 | world.breakBlock(pos, true); 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/api/ImplementedInventory.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.api; 2 | 3 | import net.minecraft.entity.player.PlayerEntity; 4 | import net.minecraft.inventory.Inventories; 5 | import net.minecraft.inventory.Inventory; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.util.DefaultedList; 8 | 9 | /** 10 | * A simple {@code Inventory} implementation with only default methods + an item list getter. 11 | * 12 | * Originally by Juuz 13 | */ 14 | public interface ImplementedInventory extends Inventory { 15 | /** 16 | * Gets the item list of this inventory. 17 | * Must return the same instance every time it's called. 18 | */ 19 | DefaultedList getItems(); 20 | // Creation 21 | /** 22 | * Creates an inventory from the item list. 23 | */ 24 | static ImplementedInventory of(DefaultedList items) { 25 | return () -> items; 26 | } 27 | /** 28 | * Creates a new inventory with the size. 29 | */ 30 | static ImplementedInventory ofSize(int size) { 31 | return of(DefaultedList.ofSize(size, ItemStack.EMPTY)); 32 | } 33 | // Inventory 34 | /** 35 | * Returns the inventory size. 36 | */ 37 | @Override 38 | default int getInvSize() { 39 | return getItems().size(); 40 | } 41 | /** 42 | * @return true if this inventory has only empty stacks, false otherwise 43 | */ 44 | @Override 45 | default boolean isInvEmpty() { 46 | for (int i = 0; i < getInvSize(); i++) { 47 | ItemStack stack = getInvStack(i); 48 | if (!stack.isEmpty()) { 49 | return false; 50 | } 51 | } 52 | return true; 53 | } 54 | /** 55 | * Gets the item in the slot. 56 | */ 57 | @Override 58 | default ItemStack getInvStack(int slot) { 59 | return getItems().get(slot); 60 | } 61 | /** 62 | * Takes a stack of the size from the slot. 63 | *

(default implementation) If there are less items in the slot than what are requested, 64 | * takes all items in that slot. 65 | */ 66 | @Override 67 | default ItemStack takeInvStack(int slot, int count) { 68 | ItemStack result = Inventories.splitStack(getItems(), slot, count); 69 | if (!result.isEmpty()) { 70 | markDirty(); 71 | } 72 | return result; 73 | } 74 | /** 75 | * Removes the current stack in the {@code slot} and returns it. 76 | */ 77 | @Override 78 | default ItemStack removeInvStack(int slot) { 79 | return Inventories.removeStack(getItems(), slot); 80 | } 81 | /** 82 | * Replaces the current stack in the {@code slot} with the provided stack. 83 | *

If the stack is too big for this inventory ({@link Inventory#getInvMaxStackAmount()}), 84 | * it gets resized to this inventory's maximum amount. 85 | */ 86 | @Override 87 | default void setInvStack(int slot, ItemStack stack) { 88 | getItems().set(slot, stack); 89 | if (stack.getCount() > getInvMaxStackAmount()) { 90 | stack.setCount(getInvMaxStackAmount()); 91 | } 92 | } 93 | /** 94 | * Clears {@linkplain #getItems() the item list}}. 95 | */ 96 | @Override 97 | default void clear() { 98 | getItems().clear(); 99 | } 100 | @Override 101 | default void markDirty() { 102 | // Override if you want behavior. 103 | } 104 | @Override 105 | default boolean canPlayerUseInv(PlayerEntity player) { 106 | return true; 107 | } 108 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/ClientMain.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica; 2 | 3 | import io.github.cottonmc.cotton.gui.client.CottonInventoryScreen; 4 | import net.fabricmc.api.ClientModInitializer; 5 | import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; 6 | import net.minecraft.client.render.RenderLayer; 7 | import team.teasanctuary.chemica.blocks.BeehiveOvenControlBlock; 8 | import team.teasanctuary.chemica.blocks.EnergyBoxBlock; 9 | import team.teasanctuary.chemica.blocks.CrusherBlock; 10 | import team.teasanctuary.chemica.blocks.SolidFuelGeneratorBlock; 11 | import team.teasanctuary.chemica.blocks.StoneAlloySmelterBlock; 12 | import team.teasanctuary.chemica.gui.*; 13 | import net.fabricmc.fabric.api.client.screen.ScreenProviderRegistry; 14 | import net.minecraft.container.BlockContext; 15 | import net.minecraft.util.Identifier; 16 | import team.teasanctuary.chemica.items.TesterItem; 17 | import team.teasanctuary.chemica.registry.Blocks; 18 | 19 | public class ClientMain implements ClientModInitializer { 20 | 21 | public static final Identifier FIRE_BAR_BG_TEXTURE = new Identifier("chemica", "textures/gui/fire_bar_bg.png"); 22 | public static final Identifier FIRE_BAR_TEXTURE = new Identifier("chemica", "textures/gui/fire_bar_fg.png"); 23 | public static final Identifier ENERGY_BAR_BG_TEXTURE = new Identifier("chemica", "textures/gui/energybar.png"); 24 | public static final Identifier ENERGY_BAR_TEXTURE = new Identifier("chemica", "textures/gui/energychemica.png"); 25 | public static final Identifier SECONDARY_PRODUCT_ARROW = new Identifier("chemica", "textures/gui/secondary_product_arrow.png"); 26 | public static final Identifier PROGRESS_ARROW_TEXTURE = new Identifier("chemica", "textures/gui/progress_arrow_fg.png"); 27 | public static final Identifier PROGRESS_ARROW_BG_TEXTURE = new Identifier("chemica", "textures/gui/progress_arrow_bg.png"); 28 | 29 | @Override 30 | public void onInitializeClient() { 31 | BlockRenderLayerMap.INSTANCE.putBlock(Blocks.CRANK_BLOCK, RenderLayer.getCutout()); 32 | 33 | ScreenProviderRegistry.INSTANCE.registerFactory(TesterItem.ID, (syncId, identifier, player, buf) -> new CottonInventoryScreen(new TesterItemController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos())), player)); 34 | ScreenProviderRegistry.INSTANCE.registerFactory(EnergyBoxBlock.ID, (syncId, identifier, player, buf) -> new CottonInventoryScreen(new EnergyBoxController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos())), player)); 35 | ScreenProviderRegistry.INSTANCE.registerFactory(CrusherBlock.ID, (syncId, identifier, player, buf) -> new CottonInventoryScreen(new CrusherBlockController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos())), player)); 36 | ScreenProviderRegistry.INSTANCE.registerFactory(SolidFuelGeneratorBlock.ID, (syncId, identifier, player, buf) -> new CottonInventoryScreen(new SolidFuelGeneratorController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos())), player)); 37 | ScreenProviderRegistry.INSTANCE.registerFactory(BeehiveOvenControlBlock.ID, (syncId, identifier, player, buf) -> new CottonInventoryScreen(new BeehiveOvenController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos())), player)); 38 | ScreenProviderRegistry.INSTANCE.registerFactory(StoneAlloySmelterBlock.ID, (syncId, identifier, player, buf) -> new CottonInventoryScreen(new StoneAlloySmelterController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos())), player)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/resources/assets/chemica/lang/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "label.chemica.beehive_oven": "Beehive Oven", 3 | "chemica.tooltip.battery_block.energyTooltip": "%d/%d J", 4 | "chemica.tooltip.crusher.crush_button_text": "Crush!", 5 | "chemica.tooltip.beehive_oven.temperatureTooltip": "%d/%d °C", 6 | "chemica.tooltip.beehive_oven.not_complete": "Multiblock is not ready. Check the structure.", 7 | "chemica.tooltip.beehive_oven.complete": "Beehive oven is ready.", 8 | "block.chemica.crusher": "Crusher", 9 | "block.chemica.energy_box": "Energy Box", 10 | "itemGroup.chemica.general": "Chemica: General", 11 | "itemGroup.chemica.ores": "Chemica: Ores", 12 | "itemGroup.chemica.materials": "Chemica: Materials", 13 | "itemGroup.chemica.items": "Chemica: Items", 14 | "itemGroup.chemica.building_blocks": "Chemica: Building Blocks", 15 | "item.chemica.screwdriver": "Screwdriver", 16 | "item.chemica.battery": "Battery", 17 | "item.chemica.tester": "Tester", 18 | "block.chemica.crank": "Crank", 19 | "block.chemica.malachite_ore": "Malachite Ore", 20 | "item.chemica.copper_ingot": "Copper Ingot", 21 | "block.chemica.solid_fuel_generator": "Solid Fuel Generator", 22 | "block.chemica.stone_alloy_smelter": "Stone Alloy Smelter", 23 | "block.chemica.beehive_oven_control": "Beehive Oven Control Block", 24 | "block.chemica.fireproof_bricks": "Fireproof Bricks", 25 | "block.chemica.fireproof_brick_slab": "Fireproof Brick Slab", 26 | "block.chemica.fireproof_brick_stairs": "Fireproof Brick Stairs", 27 | "block.chemica.fireproof_brick_wall": "Fireproof Brick Wall", 28 | "block.chemica.sandstone_bricks": "Sandstone Bricks", 29 | "block.chemica.sandstone_brick_slab": "Sandstone Brick Slab", 30 | "block.chemica.sandstone_brick_stairs": "Sandstone Brick Stairs", 31 | "block.chemica.sandstone_brick_wall": "Sandstone Brick Wall", 32 | "chemica.tooltip.battery.stored": "Stored: %d/%d J", 33 | "item.chemica.aluminum_ingot": "Aluminum Ingot", 34 | "item.chemica.bronze_ingot": "Bronze Ingot", 35 | "item.chemica.lead_ingot": "Lead Ingot", 36 | "item.chemica.magnesium_ingot": "Magnesium Ingot", 37 | "item.chemica.silver_ingot": "Silver Ingot", 38 | "item.chemica.steel_ingot": "Steel Ingot", 39 | "item.chemica.tin_ingot": "Tin Ingot", 40 | "item.chemica.zinc_ingot": "Zinc Ingot", 41 | "item.chemica.wooden_gear": "Wooden Gear", 42 | "block.chemica.argentite_ore": "Argentite Ore", 43 | "block.chemica.chalcopyrite_ore": "Chalcopyrite Ore", 44 | "block.chemica.galena_ore": "Galena Ore", 45 | "block.chemica.cuprite_ore": "Cuprite Ore", 46 | "block.chemica.rutile_ore": "Rutile Ore", 47 | "block.chemica.pyrite_ore": "Pyrite Ore", 48 | "block.chemica.silver_ore": "Silver Ore", 49 | "block.chemica.sphalerite_ore": "Sphalerite Ore", 50 | "block.chemica.zincite_ore": "Zincite Ore", 51 | "block.chemica.cassiterite_ore": "Cassiterite Ore", 52 | "item.chemica.argentite_ore_dust": "Argentite Ore Dust", 53 | "item.chemica.chalcopyrite_ore_dust": "Chalcopyrite Ore Dust", 54 | "item.chemica.galena_ore_dust": "Galena Ore Dust", 55 | "item.chemica.cuprite_ore_dust": "Cuprite Ore Dust", 56 | "item.chemica.rutile_ore_dust": "Rutile Ore Dust", 57 | "item.chemica.pyrite_ore_dust": "Pyrite Ore Dust", 58 | "item.chemica.silver_ore_dust": "Silver Ore Dust", 59 | "item.chemica.sphalerite_ore_dust": "Sphalerite Ore Dust", 60 | "item.chemica.zincite_ore_dust": "Zincite Ore Dust", 61 | "item.chemica.cassiterite_ore_dust": "Cassiterite Ore Dust", 62 | "item.chemica.coal_ore_dust": "Coal Ore Dust", 63 | "item.chemica.diamond_ore_dust": "Diamond Ore Dust", 64 | "item.chemica.gold_ore_dust": "Gold Ore Dust", 65 | "item.chemica.redstone_ore_dust": "Redstone Ore Dust", 66 | "item.chemica.iron_ore_dust": "Iron Ore Dust", 67 | "item.chemica.malachite_ore_dust": "Malachite Ore Dust" 68 | } -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/recipes/BeehiveOvenRecipe.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.recipes; 2 | 3 | import com.google.gson.JsonObject; 4 | import net.minecraft.inventory.Inventory; 5 | import net.minecraft.item.ItemStack; 6 | import net.minecraft.recipe.Ingredient; 7 | import net.minecraft.recipe.Recipe; 8 | import net.minecraft.recipe.RecipeSerializer; 9 | import net.minecraft.recipe.RecipeType; 10 | import net.minecraft.util.Identifier; 11 | import net.minecraft.util.JsonHelper; 12 | import net.minecraft.util.PacketByteBuf; 13 | import net.minecraft.world.World; 14 | import team.teasanctuary.chemica.ModMain; 15 | 16 | import static net.minecraft.recipe.ShapedRecipe.getItemStack; 17 | 18 | public class BeehiveOvenRecipe implements Recipe { 19 | public static final Identifier ID = new Identifier("chemica", "beehive_oven_recipe"); 20 | public static final BeehiveOvenRecipe.Serializer SERIALIZER = new BeehiveOvenRecipe.Serializer(); 21 | 22 | private final Identifier id; 23 | private final Ingredient input; 24 | private final ItemStack output; 25 | private final int burnTime; 26 | private final int threshold; 27 | 28 | public BeehiveOvenRecipe(Identifier id, Ingredient input, ItemStack output, int burnTime, int threshold) { 29 | this.id = id; 30 | this.input = input; 31 | this.output = output; 32 | this.burnTime = burnTime; 33 | this.threshold = threshold; 34 | } 35 | 36 | @Override 37 | public boolean matches(Inventory inv, World world) { 38 | return this.input.test(inv.getInvStack(0)); 39 | } 40 | 41 | public int getBurnTime() { return burnTime; } 42 | 43 | public int getThreshold() { return threshold; } 44 | 45 | @Override 46 | public ItemStack craft(Inventory inv) { 47 | return null; 48 | } 49 | 50 | @Override 51 | public boolean fits(int width, int height) { 52 | return true; 53 | } 54 | 55 | @Override 56 | public ItemStack getOutput() { 57 | return output; 58 | } 59 | 60 | @Override 61 | public Identifier getId() { 62 | return this.id; 63 | } 64 | 65 | @Override 66 | public RecipeSerializer getSerializer() { 67 | return SERIALIZER; 68 | } 69 | 70 | @Override 71 | public RecipeType getType() { 72 | return ModMain.BEEHIVE_OVEN_RECIPE_TYPE; 73 | } 74 | 75 | private static class Serializer implements RecipeSerializer { 76 | Serializer() { 77 | } 78 | 79 | @Override 80 | public BeehiveOvenRecipe read(Identifier id, JsonObject json) { 81 | Ingredient input = Ingredient.fromJson(JsonHelper.getObject(json, "ingredient")); 82 | ItemStack output = getItemStack(JsonHelper.getObject(json, "result")); 83 | int burnTime = JsonHelper.getInt(json, "burnTime"); 84 | int threshold = JsonHelper.getInt(json, "threshold"); 85 | return new BeehiveOvenRecipe(id, input, output, burnTime, threshold); 86 | } 87 | 88 | @Override 89 | public BeehiveOvenRecipe read(Identifier id, PacketByteBuf buf) { 90 | Ingredient input = Ingredient.fromPacket(buf); 91 | ItemStack output = buf.readItemStack(); 92 | int burnTime = buf.readVarInt(); 93 | int threshold = buf.readVarInt(); 94 | return new BeehiveOvenRecipe(id, input, output, burnTime, threshold); 95 | } 96 | 97 | @Override 98 | public void write(PacketByteBuf buf, BeehiveOvenRecipe recipe) { 99 | recipe.input.write(buf); 100 | buf.writeItemStack(recipe.output); 101 | buf.writeVarInt(recipe.burnTime); 102 | buf.writeVarInt(recipe.threshold); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/recipes/CrusherRecipe.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.recipes; 2 | 3 | import com.google.gson.JsonObject; 4 | import com.google.gson.JsonParseException; 5 | import com.google.gson.JsonSyntaxException; 6 | import net.minecraft.inventory.Inventory; 7 | import net.minecraft.item.Item; 8 | import net.minecraft.item.ItemStack; 9 | import net.minecraft.recipe.*; 10 | import net.minecraft.util.Identifier; 11 | import net.minecraft.util.JsonHelper; 12 | import net.minecraft.util.PacketByteBuf; 13 | import net.minecraft.util.registry.Registry; 14 | import net.minecraft.world.World; 15 | import team.teasanctuary.chemica.ModMain; 16 | 17 | public class CrusherRecipe implements Recipe { 18 | public static final Identifier ID = new Identifier("chemica", "crusher_recipe"); 19 | public static final Serializer SERIALIZER = new Serializer(); 20 | 21 | private final Identifier id; 22 | private final Ingredient input; 23 | private final ItemStack output; 24 | private final int ticks; 25 | 26 | public CrusherRecipe(Identifier id, Ingredient input, ItemStack output, int ticks) { 27 | this.id = id; 28 | this.input = input; 29 | this.output = output; 30 | this.ticks = ticks; 31 | } 32 | 33 | @Override 34 | public String toString() { 35 | return "CrusherRecipe [input=" + this.input + ", output=" + this.output + ", id=" + this.id + ", ticks=" + this.ticks + "]"; 36 | } 37 | 38 | @Override 39 | public boolean matches(Inventory inv, World worldIn) { 40 | return this.input.test(inv.getInvStack(0)); 41 | } 42 | 43 | @Override 44 | public ItemStack craft(Inventory inv) { 45 | return this.output.copy(); 46 | } 47 | 48 | @Override 49 | public boolean fits(int width, int height) { 50 | return true; 51 | } 52 | 53 | @Override 54 | public ItemStack getOutput() { 55 | return this.output; 56 | } 57 | 58 | @Override 59 | public Identifier getId() { 60 | return this.id; 61 | } 62 | 63 | public int getTicks() { 64 | return this.ticks; 65 | } 66 | 67 | @Override 68 | public RecipeSerializer getSerializer() { 69 | return SERIALIZER; 70 | } 71 | 72 | @Override 73 | public RecipeType getType() { 74 | return ModMain.CRUSHER_RECIPE; 75 | } 76 | 77 | private static class Serializer implements RecipeSerializer { 78 | Serializer() { 79 | } 80 | 81 | @Override 82 | public CrusherRecipe read(Identifier id, JsonObject json) { 83 | Ingredient input = Ingredient.fromJson(JsonHelper.getObject(json, "ingredient")); 84 | ItemStack output = getItemStack(JsonHelper.getObject(json, "result")); 85 | int ticks = JsonHelper.getInt(json, "ticks"); 86 | return new CrusherRecipe(id, input, output, ticks); 87 | } 88 | 89 | @Override 90 | public CrusherRecipe read(Identifier id, PacketByteBuf buf) { 91 | Ingredient input = Ingredient.fromPacket(buf); 92 | ItemStack output = buf.readItemStack(); 93 | int ticks = buf.readVarInt(); 94 | return new CrusherRecipe(id, input, output, ticks); 95 | } 96 | 97 | @Override 98 | public void write(PacketByteBuf buf, CrusherRecipe recipe) { 99 | recipe.input.write(buf); 100 | buf.writeItemStack(recipe.output); 101 | buf.writeVarInt(recipe.ticks); 102 | } 103 | 104 | public static ItemStack getItemStack(JsonObject json) { 105 | String string = JsonHelper.getString(json, "item"); 106 | Item item = Registry.ITEM.getOrEmpty(new Identifier(string)).orElseThrow(() -> new JsonSyntaxException("Unknown item '" + string + "'")); 107 | if (json.has("data")) { 108 | throw new JsonParseException("Disallowed data tag found"); 109 | } else { 110 | int i = JsonHelper.getInt(json, "count", 1); 111 | return new ItemStack(item, i); 112 | } 113 | } 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/ModMain.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica; 2 | 3 | import net.fabricmc.api.ModInitializer; 4 | import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; 5 | import net.minecraft.item.ItemStack; 6 | import net.minecraft.recipe.RecipeType; 7 | import team.teasanctuary.chemica.blocks.*; 8 | import team.teasanctuary.chemica.gui.*; 9 | import net.fabricmc.fabric.api.container.ContainerProviderRegistry; 10 | import net.minecraft.container.BlockContext; 11 | import net.minecraft.item.ItemGroup; 12 | import net.minecraft.util.Identifier; 13 | import net.minecraft.util.registry.Registry; 14 | import team.teasanctuary.chemica.items.TesterItem; 15 | import team.teasanctuary.chemica.recipes.BeehiveOvenRecipe; 16 | import team.teasanctuary.chemica.recipes.CrusherRecipe; 17 | import team.teasanctuary.chemica.recipes.GeneratorRecipe; 18 | import team.teasanctuary.chemica.recipes.StoneAlloySmelterRecipe; 19 | import team.teasanctuary.chemica.registry.*; 20 | 21 | public class ModMain implements ModInitializer { 22 | 23 | public static final RecipeType CRUSHER_RECIPE = new RecipeType() { 24 | @Override 25 | public String toString () { 26 | return CrusherRecipe.ID.toString(); 27 | } 28 | }; 29 | 30 | public static final RecipeType GENERATOR_RECIPE = new RecipeType() { 31 | @Override 32 | public String toString () { 33 | return GeneratorRecipe.ID.toString(); 34 | } 35 | }; 36 | 37 | public static final RecipeType BEEHIVE_OVEN_RECIPE_TYPE = new RecipeType() { 38 | @Override 39 | public String toString () { 40 | return BeehiveOvenRecipe.ID.toString(); 41 | } 42 | }; 43 | 44 | public static final RecipeType STONE_ALLOY_SMELTER_RECIPE = new RecipeType() { 45 | @Override 46 | public String toString () { 47 | return StoneAlloySmelterRecipe.ID.toString(); 48 | } 49 | }; 50 | 51 | public static final ItemGroup CHEMICA_GENERAL = FabricItemGroupBuilder.create( 52 | new Identifier("chemica", "general")) 53 | .icon(() -> new ItemStack(Blocks.ENERGY_BOX_BLOCK)) 54 | .build(); 55 | 56 | @Override 57 | public void onInitialize() { 58 | Ores.init(); 59 | Blocks.init(); 60 | Items.init(); 61 | Materials.init(); 62 | Generation.init(); 63 | 64 | Registry.register(Registry.RECIPE_TYPE, CrusherRecipe.ID, CRUSHER_RECIPE); 65 | Registry.register(Registry.RECIPE_SERIALIZER, CrusherRecipe.ID, CrusherRecipe.SERIALIZER); 66 | 67 | Registry.register(Registry.RECIPE_TYPE, GeneratorRecipe.ID, GENERATOR_RECIPE); 68 | Registry.register(Registry.RECIPE_SERIALIZER, GeneratorRecipe.ID, GeneratorRecipe.SERIALIZER); 69 | 70 | Registry.register(Registry.RECIPE_TYPE, BeehiveOvenRecipe.ID, BEEHIVE_OVEN_RECIPE_TYPE); 71 | Registry.register(Registry.RECIPE_SERIALIZER, BeehiveOvenRecipe.ID, BeehiveOvenRecipe.SERIALIZER); 72 | 73 | Registry.register(Registry.RECIPE_TYPE, StoneAlloySmelterRecipe.ID, STONE_ALLOY_SMELTER_RECIPE); 74 | Registry.register(Registry.RECIPE_SERIALIZER, StoneAlloySmelterRecipe.ID, StoneAlloySmelterRecipe.SERIALIZER); 75 | 76 | ContainerProviderRegistry.INSTANCE.registerFactory(EnergyBoxBlock.ID, (syncId, id, player, buf) -> new EnergyBoxController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos()))); 77 | ContainerProviderRegistry.INSTANCE.registerFactory(CrusherBlock.ID, (syncId, id, player, buf) -> new CrusherBlockController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos()))); 78 | ContainerProviderRegistry.INSTANCE.registerFactory(TesterItem.ID, (syncId, id, player, buf) -> new TesterItemController(syncId, player.inventory, BlockContext.create(player.world, player.getBlockPos()))); 79 | ContainerProviderRegistry.INSTANCE.registerFactory(SolidFuelGeneratorBlock.ID, (syncId, id, player, buf) -> new SolidFuelGeneratorController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos()))); 80 | ContainerProviderRegistry.INSTANCE.registerFactory(BeehiveOvenControlBlock.ID, (syncId, id, player, buf) -> new BeehiveOvenController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos()))); 81 | ContainerProviderRegistry.INSTANCE.registerFactory(StoneAlloySmelterBlock.ID, (syncId, id, player, buf) -> new StoneAlloySmelterController(syncId, player.inventory, BlockContext.create(player.world, buf.readBlockPos()))); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/team/teasanctuary/chemica/entities/SolidFuelGeneratorEntity.java: -------------------------------------------------------------------------------- 1 | package team.teasanctuary.chemica.entities; 2 | 3 | import net.minecraft.container.PropertyDelegate; 4 | import net.minecraft.item.ItemStack; 5 | import net.minecraft.nbt.CompoundTag; 6 | import team.teasanctuary.chemica.ModMain; 7 | import team.teasanctuary.chemica.api.IEnergyProvider; 8 | import team.teasanctuary.chemica.api.MachineBlockWithEnergy; 9 | import team.teasanctuary.chemica.blocks.SolidFuelGeneratorBlock; 10 | import team.teasanctuary.chemica.recipes.GeneratorRecipe; 11 | import team.teasanctuary.chemica.registry.Blocks; 12 | 13 | public class SolidFuelGeneratorEntity extends MachineBlockWithEnergy implements IEnergyProvider { 14 | 15 | private int recipeBurnTime = 0; 16 | private int burnTime = 0; 17 | private boolean isBurning = false; 18 | 19 | public SolidFuelGeneratorEntity() { 20 | super(Blocks.SOLID_FUEL_GENERATOR_ENTITY, 100000, true, 2); 21 | } 22 | 23 | @Override 24 | public CompoundTag toTag(CompoundTag tag) { 25 | tag.putInt("recipeBurnTime", recipeBurnTime); 26 | tag.putInt("burnTime", burnTime); 27 | tag.putBoolean("isBurning", isBurning); 28 | return super.toTag(tag); 29 | } 30 | 31 | @Override 32 | public void fromTag(CompoundTag tag) { 33 | super.fromTag(tag); 34 | recipeBurnTime = tag.getInt("recipeBurnTime"); 35 | burnTime = tag.getInt("burnTime"); 36 | isBurning = tag.getBoolean("isBurning"); 37 | } 38 | 39 | private final PropertyDelegate propertyDelegate = new PropertyDelegate() { 40 | @Override 41 | public int get(int index) { 42 | switch (index) { 43 | case 0: return energy.getAmount(); 44 | case 1: return energy.getCapacity(); 45 | case 2: return burnTime; 46 | case 3: return recipeBurnTime; 47 | default: return 0; 48 | } 49 | } 50 | 51 | @Override 52 | public void set(int index, int value) { 53 | switch (index) { 54 | case 0: // Current Energy 55 | energy.setEnergy(value); 56 | break; 57 | case 1: // Max Energy 58 | energy.setCapacity(value); 59 | break; 60 | case 2: // Burn Time 61 | burnTime = value; 62 | break; 63 | case 3: // Burn Time Total 64 | recipeBurnTime = value; 65 | break; 66 | default: 67 | break; 68 | } 69 | } 70 | 71 | @Override 72 | public int size() { 73 | return 4; 74 | } 75 | }; 76 | 77 | @Override 78 | public PropertyDelegate getPropertyDelegate() { 79 | return propertyDelegate; 80 | } 81 | 82 | @Override 83 | public void tick() { 84 | if (!world.isClient) { 85 | if (isBurning) { 86 | --burnTime; 87 | energy.receive(30, false); 88 | if (burnTime <= 0) { 89 | isBurning = false; 90 | burnTime = 0; 91 | recipeBurnTime = 0; 92 | world.setBlockState(pos, getCachedState().with(SolidFuelGeneratorBlock.BURNING, false)); 93 | } 94 | } 95 | 96 | ItemStack from = getInvStack(0); 97 | 98 | if (!from.isEmpty() && !isBurning) { 99 | GeneratorRecipe recipe = world.getRecipeManager().getFirstMatch(ModMain.GENERATOR_RECIPE, this, this.world).orElse(null); 100 | 101 | if (recipe != null) { 102 | if (canReceiveOutput(recipe)) { 103 | ItemStack input = getInvStack(0); 104 | burnTime = recipe.getBurnTime(); 105 | recipeBurnTime = burnTime; 106 | isBurning = true; 107 | world.setBlockState(pos, getCachedState().with(SolidFuelGeneratorBlock.BURNING, true)); 108 | 109 | input.decrement(1); 110 | } 111 | } 112 | } 113 | if (energy.getAmount() > 0) { 114 | energy.emitEnergy(this, world, pos, 30); 115 | } 116 | } 117 | } 118 | 119 | private boolean canReceiveOutput(GeneratorRecipe recipe) { 120 | return !(energy.getAmount() >= energy.getCapacity()); 121 | } 122 | } 123 | --------------------------------------------------------------------------------