Merge pull request #209 from Daniel366Cobra/trinkets-and-trifles

Small additions
This commit is contained in:
DrMangoTea
2025-07-23 23:13:19 +02:00
committed by GitHub
48 changed files with 1815 additions and 403 deletions

3
.gitignore vendored
View File

@@ -5,4 +5,5 @@
/run-data/
/.idea/
/.vscode/
/build/classes/java/main/
/build/classes/java/main/
/src/generated/resources/.cache/

View File

@@ -0,0 +1,10 @@
{
"variants": {
"lit=false": {
"model": "tfmg:block/gas_lamp/block"
},
"lit=true": {
"model": "tfmg:block/gas_lamp/block_lit"
}
}
}

View File

@@ -204,6 +204,8 @@
"block.tfmg.fossilstone": "ǝuoʇsןıssoℲ",
"block.tfmg.galena": "ɐuǝןɐ⅁",
"block.tfmg.galena_pillar": "ɹɐןןıԀ ɐuǝןɐ⅁",
"block.tfmg.gas_lamp": "dɯɐꞀ sɐ⅁",
"block.tfmg.gas_lamp.tooltip.summary": "˙ʇɥbıן ǝpıʌoɹd oʇ spınןɟ ǝןqıʇsnqɯoɔ suɹnᗺ",
"block.tfmg.gasoline": "ǝuıןosɐ⅁",
"block.tfmg.generator": "ɹoʇɐɹǝuǝ⅁",
"block.tfmg.glass_aluminum_pipe": "ǝdıԀ ɯnuıɯnןⱯ ssɐן⅁",
@@ -425,7 +427,6 @@
"block.tfmg.red_rebar_concrete_stairs": "sɹıɐʇS ǝʇǝɹɔuoƆ ɹɐqǝᴚ pǝᴚ",
"block.tfmg.red_rebar_concrete_wall": "ןןɐM ǝʇǝɹɔuoƆ ɹɐqǝᴚ pǝᴚ",
"block.tfmg.regular_engine": "ǝuıbuƎ ɹɐןnbǝᴚ",
"block.tfmg.reinforced_fireproof_bricks": "sʞɔıɹᗺ ɟooɹdǝɹıℲ pǝɔɹoɟuıǝᴚ",
"block.tfmg.resistor": "ɹoʇsısǝᴚ",
"block.tfmg.resistor.tooltip.behaviour1": "uı sı ʞɔoןq ʇǝbɹɐʇ sʇı dnoɹb ɔıɹʇɔǝןǝ ɹǝʌǝʇɐɥʍ oʇ )dıʇןooʇ sǝuıɥɔɐɯ buıpuıʍ ǝɥʇ ʇɐ ʞooן ǝɔuɐʇsısǝɹ sʇı ǝbuɐɥɔ oʇ ʍoɥ ǝǝs oʇ( ǝɔuɐʇsısǝɹ ǝʌıʇɔǝdsǝɹ sɹoʇsısǝɹ ǝɥʇ sppⱯ",
"block.tfmg.resistor.tooltip.condition1": "dnoɹb ɐ uıɥʇıʍ ʞɔoןq ɐ uo pǝɔɐןd uǝɥM",
@@ -605,6 +606,9 @@
"create.multimeter.energy_usage": " :ǝbɐs∩ ʎbɹǝuƎ ",
"create.multimeter.group": " :dnoɹ⅁ ",
"create.multimeter.header": ":ɐʇɐᗡ ɹǝʇǝɯıʇןnW",
"create.multimeter.network_power_consumption": " :uoıʇdɯnsuoɔ ɹǝʍod ʞɹoʍʇǝN",
"create.multimeter.network_power_generation": " :uoıʇɐɹǝuǝb ɹǝʍod ʞɹoʍʇǝN",
"create.multimeter.not_enough_power": "¡ᴚƎMOԀ H⅁∩ONƎ ⟘ON",
"create.multimeter.power_generated": " :pǝʇɐɹǝuǝ⅁ ɹǝʍoԀ ",
"create.multimeter.power_percentage": " :ɥʇbuǝɹʇS pıɹ⅁ ",
"create.multimeter.power_usage": " :ǝbɐs∩ ɹǝʍoԀ ",
@@ -646,6 +650,7 @@
"effect.tfmg.hellfire": "ǝɹıɟןןǝH",
"entity.tfmg.blue_spark": "ʞɹɐdS ǝnןᗺ",
"entity.tfmg.copper_grenade": "ǝpɐuǝɹ⅁ ɹǝddoƆ",
"entity.tfmg.dry_ice_flake": "ǝʞɐןℲ ǝɔI ʎɹᗡ",
"entity.tfmg.green_spark": "ʞɹɐdS uǝǝɹ⅁",
"entity.tfmg.lithium_spark": "ʞɹɐdS ɯnıɥʇıꞀ",
"entity.tfmg.napalm_bomb_entity": "ʎʇıʇuƎ qɯoᗺ ɯןɐdɐN",
@@ -773,6 +778,8 @@
"item.tfmg.engine_cylinder": "ɹǝpuıןʎƆ ǝuıbuƎ",
"item.tfmg.etched_circuit_board": "pɹɐoᗺ ʇınɔɹıƆ pǝɥɔʇƎ",
"item.tfmg.ethylene_bucket": "ʞuɐ⟘ ǝuǝןʎɥʇƎ",
"item.tfmg.fire_extinguisher": "ɹǝɥsınbuıʇxƎ ǝɹıℲ",
"item.tfmg.fire_extinguisher.tooltip.summary": "˙sǝɹıɟ ɥsınbuıʇxǝ oʇ ‾ǝpıxoıᗡ uoqɹɐƆ‾ sǝs∩",
"item.tfmg.fireclay_ball": "ןןɐᗺ ʎɐןɔǝɹıℲ",
"item.tfmg.fireproof_brick": "ʞɔıɹᗺ ɟooɹdǝɹıℲ",
"item.tfmg.flamethrower": "ɹǝʍoɹɥʇǝɯɐןℲ",
@@ -983,6 +990,8 @@
"tfmg.keyinfo.engine_start": "ǝuıbuƎ ʇɹɐʇS",
"tfmg.keyinfo.transmission_shift_down": "uʍoᗡ ʇɟıɥS uoıssıɯsuɐɹ⟘",
"tfmg.keyinfo.transmission_shift_up": "d∩ ʇɟıɥS uoıssıɯsuɐɹ⟘",
"tfmg.ponder.arc_furnace.header": "ǝɔɐuɹnℲ ɔɹⱯ",
"tfmg.ponder.arc_furnace.text_1": "ǝɔɐuɹnℲ ɔɹⱯ uɐ ǝʇɐǝɹɔ sǝpoɹʇɔǝןƎ ǝʇıɥdɐɹ⅁ Ɛ",
"tfmg.ponder.blast_furnace.header": "",
"tfmg.ponder.blast_furnace.text_1": "ʇndʇno ǝɔɐuɹnɟ ʇsɐןq ɐ sı ǝɔɐuɹnɟ ʇsɐןq ɐ ɟo ʇɹɐd uıɐW",
"tfmg.ponder.blast_furnace.text_2": "ʇı uı ɥɔʇɐɥ ǝɔɐuɹnɟ ʇsɐןq ǝuo ɥʇıʍ ʇı punoɹɐ sʞɔıɹq ɟooɹdǝɹıɟ ɟo ɹǝpuıןʎɔ ɐ ǝʞɐɯ 'ǝɔɐuɹnɟ ʇsɐןq ɐ pןınq o⟘",
@@ -1031,6 +1040,8 @@
"tfmg.ponder.electricity_two.text_5": "ʞɹoʍʇǝuqns ǝɥʇ oʇ sʇǝb ʇɐɥʇ ǝbɐʇןoʌ ɟo ǝbɐʇuǝɔɹǝd ǝɥʇ ʇǝs uɐɔ ǝuo sıɥʇ 'ɹǝʇǝɯoıʇuǝʇod ǝɥʇ sı ǝuo ʇxǝN",
"tfmg.ponder.electricity_two.text_6": "ǝuoʇspǝɹ ɥʇıʍ ʇnq ʎןɹɐןıɯıs sʞɹoʍ ɥɔʇıʍs ǝɥ⟘",
"tfmg.ponder.electricity_two.text_7": "ןıoɔ ʎɹɐpuoɔǝs puɐ ʎɹɐɯıɹd ǝɥʇ uǝǝʍʇǝq suɹnʇ ɟo oıʇɐɹ ǝɥʇ uo pǝsɐq ǝbɐʇןoʌ sǝbuɐɥɔ ɹǝɯɹoɟsuɐɹʇ ǝɥ⟘",
"tfmg.ponder.electrolysis.header": "sıןoɹʇɔǝןƎ",
"tfmg.ponder.electrolysis.text_1": "ɹǝzʎןoɹʇɔǝןƎ uɐ sǝʇɐǝɹɔ sǝpoɹʇɔǝןƎ ɔuıZ ɹo ɹǝddoƆ ɥʇıʍ sɹǝpןoɥ ǝpoɹʇɔǝןǝ ᄅ buıɔɐןԀ",
"tfmg.ponder.engines.header": "sǝuıbuƎ",
"tfmg.ponder.engines.text_1": "ǝuıן ɐ uı sʞɔoןq ǝuıbuǝ ϛ oʇ dn buıɔɐןd ʎq ʇɹɐʇs 'ǝuıbuǝ uɐ pןınq o⟘",
"tfmg.ponder.engines.text_2": ןqɯǝssɐ ǝɥʇ ɹoɟ pǝpǝǝu sɯǝʇı noʎ ʍoɥs ןןıʍ dıʇןooʇ s,ǝuıbuǝ ǝɥ⟘",
@@ -1041,13 +1052,18 @@
"tfmg.ponder.engines.text_7": "pǝpɐɹbdn ǝq oʇ sɯǝʇı uıɐʇɹǝɔ ɥʇıʍ pǝʞɔıןɔ ʇɥbıɹ ǝq uɐɔ ʞɔoןq ǝuıbuǝ ʎɹǝʌƎ",
"tfmg.ponder.engines.text_8": "sʞuɐʇ buıɹoqɥbıǝu ɯoɹɟ ןǝnɟ ǝɯnsuoɔ ǝuıbuǝ ǝɥʇ ǝʞɐɯ sǝdıd ןɐıɹʇsnpuı ǝןdɯɐxǝ ɹoℲ",
"tfmg.ponder.engines.text_9": "ןɐubıs ǝuoʇspǝɹ ɐ ɥʇıʍ pǝʇɹɐʇs ǝq uɐɔ ǝuıbuǝ ǝɥ⟘",
"tfmg.ponder.industrial_mixer.header": "ɹǝxıW ןɐıɹʇsnpuI",
"tfmg.ponder.industrial_mixer.text_1": "ʇɐΛ ןɐɔıɯǝɥƆ ǝɥʇ ɹoɟ ʇuǝɯɥɔɐʇʇɐ ǝuıɥɔɐɯ ɐ sı ɹǝxıW ןɐıɹʇsnpuI ǝɥ⟘",
"tfmg.ponder.industrial_mixer.text_2": "ɹǝxıW ɐ sǝɯoɔǝq ʇɐʌ ǝɥʇ 'pǝʇɹǝsuı sı ǝpɐןᗺ ɹǝxıW ǝɥʇ uǝɥM",
"tfmg.ponder.industrial_mixer.text_3": "ǝbnɟıɹʇuǝƆ ɐ ǝɯoɔǝq osןɐ uɐɔ ɹǝxıW ןɐıɹʇsnpuI ǝɥ⟘",
"tfmg.ponder.pumpjack.header": "ʞɔɐظdɯnԀ",
"tfmg.ponder.pumpjack.text_1": "ǝɔɐɟɹns ǝɥʇ oʇ ʇısodǝp ɐ ɯoɹɟ sǝdıd ןɐıɹʇsnpuı buıpןınq sı ןıo buıuıɯ ɟo dǝʇs ʇsɹıℲ",
"tfmg.ponder.pumpjack.text_2": "ǝdıd ǝɥʇ ɟo doʇ ǝɥʇ uo pǝɔɐןd ǝq oʇ sɐɥ ǝsɐq ʞɔɐظdɯnԀ",
"tfmg.ponder.pumpjack.text_3": "ʇı puıɥǝq pǝɔɐןd ǝq oʇ spǝǝu ɹǝpןoH ɹǝɯɯɐH ʞɔɐظdɯnԀ",
"tfmg.ponder.pumpjack.text_4": "ǝsɐq ǝɥʇ puɐ ʞuɐɹɔ ǝɥʇ ǝʌoqɐ ʞɔɐظdɯnԀ ǝɥʇ ɟo pɐǝH ǝɥʇ puⱯ ɹoʇɔǝuuoƆ ǝɥʇ buıpןınq sı dǝʇs ʇxǝN",
"tfmg.ponder.pumpjack.text_5": "sʇɹɐԀ ɹǝɯɯɐH ʞɔɐظdɯnԀ ɥʇıʍ pǝʇɔǝuuoɔ ǝq oʇ pǝǝu ʎǝɥʇ ʍoN",
"tfmg.ponder.pumpjack.text_6": "ʇı ǝʌoqɐ ʞuɐɹɔ ʞɔɐظdɯnd ɐ ɥʇıʍ )ʞɔɐظdɯnd ǝɥʇ ɹoɟ ʇnduı ɹǝʍod ǝɥʇ sı ɥɔıɥʍ( ʇnduı ǝuıɥɔɐɯ ɐ buıɔɐןd sı dǝʇs ʇsɐן ǝɥ⟘",
"tfmg.ponder.pumpjack.text_6": "ʎןɹǝdoɹd ǝןqɯǝssɐ ʇou ןןıʍ ʞɔɐظdɯnd ǝɥʇ ǝsıʍɹǝɥʇo 'ǝnן⅁ ɹǝdnS ǝsn oʇ ǝɹns ǝʞɐW",
"tfmg.ponder.pumpjack.text_7": "ʇı ǝʌoqɐ ʞuɐɹɔ ʞɔɐظdɯnd ɐ ɥʇıʍ )ʞɔɐظdɯnd ǝɥʇ ɹoɟ ʇnduı ɹǝʍod ǝɥʇ sı ɥɔıɥʍ( ʇnduı ǝuıɥɔɐɯ ɐ buıɔɐןd sı dǝʇs ʇsɐן ǝɥ⟘",
"tfmg.ponder.shared.behaviour_modify_value_panel": "ןǝuɐd ǝnןɐʌ ǝɥʇ buısn pǝıɟıpoɯ ǝq uɐɔ ɹnoıʌɐɥǝq sıɥ⟘",
"tfmg.ponder.shared.movement_anchors": "˙pǝʌoɯ ǝq uɐɔ sǝɹnʇɔnɹʇs ɹǝbɹɐן 'ǝnן⅁ ɹǝdnS ɟo dןǝɥ ǝɥʇ ɥʇıM",
"tfmg.ponder.shared.rpm16": "WԀᴚ 9Ɩ",
@@ -1065,6 +1081,10 @@
"tfmg.ponder.tag.metallurgy.description": "ןɐʇǝɯ buıssǝɔoɹd oʇ pǝʇɐןǝɹ sʞɔoןᗺ",
"tfmg.ponder.tag.oil_processing": "ʎɹǝuıɥɔɐW buıssǝɔoɹԀ ןıO",
"tfmg.ponder.tag.oil_processing.description": "ןıo buıuıɯ puɐ buıuıɟǝɹ ɹoɟ pǝsn ʞɔoןᗺ",
"tfmg.subtitle.diesel_engine_sounds": "spunoS ǝuıbuƎ ןǝsǝıᗡ",
"tfmg.subtitle.engine_sounds": "spunoS ǝuıbuƎ"
"tfmg.subtitle.diesel_engine_sounds": "spunos ǝuıbuƎ ןǝsǝıᗡ",
"tfmg.subtitle.electric_hum": "ɯnɥ ɔıɹʇɔǝןƎ",
"tfmg.subtitle.engine_sounds": "spunos ǝuıbuƎ",
"tfmg.subtitle.generator_hum": "ɯnɥ ɹoʇɐɹǝuǝ⅁",
"tfmg.subtitle.switch_off": "buıuǝdo ɥɔʇıʍS",
"tfmg.subtitle.switch_on": "buısoןɔ ɥɔʇıʍS"
}

View File

@@ -204,6 +204,8 @@
"block.tfmg.fossilstone": "Fossilstone",
"block.tfmg.galena": "Galena",
"block.tfmg.galena_pillar": "Galena Pillar",
"block.tfmg.gas_lamp": "Gas Lamp",
"block.tfmg.gas_lamp.tooltip.summary": "Burns combustible fluids to provide light.",
"block.tfmg.gasoline": "Gasoline",
"block.tfmg.generator": "Generator",
"block.tfmg.glass_aluminum_pipe": "Glass Aluminum Pipe",
@@ -425,7 +427,6 @@
"block.tfmg.red_rebar_concrete_stairs": "Red Rebar Concrete Stairs",
"block.tfmg.red_rebar_concrete_wall": "Red Rebar Concrete Wall",
"block.tfmg.regular_engine": "Regular Engine",
"block.tfmg.reinforced_fireproof_bricks": "Reinforced Fireproof Bricks",
"block.tfmg.resistor": "Resistor",
"block.tfmg.resistor.tooltip.behaviour1": "Adds the resistors respective resistance (to see how to change its resistance look at the winding machines tooltip) to whatever electric group its target block is in",
"block.tfmg.resistor.tooltip.condition1": "When placed on a block within a group",
@@ -605,6 +606,9 @@
"create.multimeter.energy_usage": " Energy Usage: ",
"create.multimeter.group": " Group: ",
"create.multimeter.header": "Multimeter Data:",
"create.multimeter.network_power_consumption": "Network power consumption: ",
"create.multimeter.network_power_generation": "Network power generation: ",
"create.multimeter.not_enough_power": "NOT ENOUGH POWER!",
"create.multimeter.power_generated": " Power Generated: ",
"create.multimeter.power_percentage": " Grid Strength: ",
"create.multimeter.power_usage": " Power Usage: ",
@@ -646,6 +650,7 @@
"effect.tfmg.hellfire": "Hellfire",
"entity.tfmg.blue_spark": "Blue Spark",
"entity.tfmg.copper_grenade": "Copper Grenade",
"entity.tfmg.dry_ice_flake": "Dry Ice Flake",
"entity.tfmg.green_spark": "Green Spark",
"entity.tfmg.lithium_spark": "Lithium Spark",
"entity.tfmg.napalm_bomb_entity": "Napalm Bomb Entity",
@@ -773,6 +778,8 @@
"item.tfmg.engine_cylinder": "Engine Cylinder",
"item.tfmg.etched_circuit_board": "Etched Circuit Board",
"item.tfmg.ethylene_bucket": "Ethylene Tank",
"item.tfmg.fire_extinguisher": "Fire Extinguisher",
"item.tfmg.fire_extinguisher.tooltip.summary": "Uses _Carbon Dioxide_ to extinguish fires.",
"item.tfmg.fireclay_ball": "Fireclay Ball",
"item.tfmg.fireproof_brick": "Fireproof Brick",
"item.tfmg.flamethrower": "Flamethrower",
@@ -983,6 +990,8 @@
"tfmg.keyinfo.engine_start": "Start Engine",
"tfmg.keyinfo.transmission_shift_down": "Transmission Shift Down",
"tfmg.keyinfo.transmission_shift_up": "Transmission Shift Up",
"tfmg.ponder.arc_furnace.header": "Arc Furnace",
"tfmg.ponder.arc_furnace.text_1": "3 Graphite Electrodes create an Arc Furnace",
"tfmg.ponder.blast_furnace.header": "",
"tfmg.ponder.blast_furnace.text_1": "Main part of a blast furnace is a blast furnace output",
"tfmg.ponder.blast_furnace.text_2": "To build a blast furnace, make a cylinder of fireproof bricks around it with one blast furnace hatch in it",
@@ -1031,6 +1040,8 @@
"tfmg.ponder.electricity_two.text_5": "Next one is the potentiometer, this one can set the percentage of voltage that gets to the subnetwork",
"tfmg.ponder.electricity_two.text_6": "The switch works similarly but with redstone",
"tfmg.ponder.electricity_two.text_7": "The transformer changes voltage based on the ratio of turns between the primary and secondary coil",
"tfmg.ponder.electrolysis.header": "Electrolysis",
"tfmg.ponder.electrolysis.text_1": "Placing 2 electrode holders with Copper or Zinc Electrodes creates an Electrolyzer",
"tfmg.ponder.engines.header": "Engines",
"tfmg.ponder.engines.text_1": "To build an engine, start by placing up to 5 engine blocks in a line",
"tfmg.ponder.engines.text_2": "The engine's tooltip will show you items needed for the assembly",
@@ -1041,13 +1052,18 @@
"tfmg.ponder.engines.text_7": "Every engine block can be right clicked with certain items to be upgraded",
"tfmg.ponder.engines.text_8": "For example industrial pipes make the engine consume fuel from neighboring tanks",
"tfmg.ponder.engines.text_9": "The engine can be started with a redstone signal",
"tfmg.ponder.industrial_mixer.header": "Industrial Mixer",
"tfmg.ponder.industrial_mixer.text_1": "The Industrial Mixer is a machine attachment for the Chemical Vat",
"tfmg.ponder.industrial_mixer.text_2": "When the Mixer Blade is inserted, the vat becomes a Mixer",
"tfmg.ponder.industrial_mixer.text_3": "The Industrial Mixer can also become a Centrifuge",
"tfmg.ponder.pumpjack.header": "Pumpjack",
"tfmg.ponder.pumpjack.text_1": "First step of mining oil is building industrial pipes from a deposit to the surface",
"tfmg.ponder.pumpjack.text_2": "Pumpjack base has to be placed on the top of the pipe",
"tfmg.ponder.pumpjack.text_3": "Pumpjack Hammer Holder needs to be placed behind it",
"tfmg.ponder.pumpjack.text_4": "Next step is building the Connector And the Head of the Pumpjack above the crank and the base",
"tfmg.ponder.pumpjack.text_5": "Now they need to be connected with Pumpjack Hammer Parts",
"tfmg.ponder.pumpjack.text_6": "The last step is placing a machine input (which is the power input for the pumpjack) with a pumpjack crank above it",
"tfmg.ponder.pumpjack.text_6": "Make sure to use Super Glue, otherwise the pumpjack will not assemble properly",
"tfmg.ponder.pumpjack.text_7": "The last step is placing a machine input (which is the power input for the pumpjack) with a pumpjack crank above it",
"tfmg.ponder.shared.behaviour_modify_value_panel": "This behaviour can be modified using the value panel",
"tfmg.ponder.shared.movement_anchors": "With the help of Super Glue, larger structures can be moved.",
"tfmg.ponder.shared.rpm16": "16 RPM",
@@ -1065,6 +1081,10 @@
"tfmg.ponder.tag.metallurgy.description": "Blocks related to processing metal",
"tfmg.ponder.tag.oil_processing": "Oil Processing Machinery",
"tfmg.ponder.tag.oil_processing.description": "Block used for refining and mining oil",
"tfmg.subtitle.diesel_engine_sounds": "Diesel Engine Sounds",
"tfmg.subtitle.engine_sounds": "Engine Sounds"
"tfmg.subtitle.diesel_engine_sounds": "Diesel Engine sounds",
"tfmg.subtitle.electric_hum": "Electric hum",
"tfmg.subtitle.engine_sounds": "Engine sounds",
"tfmg.subtitle.generator_hum": "Generator hum",
"tfmg.subtitle.switch_off": "Switch opening",
"tfmg.subtitle.switch_on": "Switch closing"
}

View File

@@ -1,3 +1,3 @@
{
"parent": "tfmg:block/cast_iron_chemical_vat/block_single_window"
"parent": "tfmg:block/cast_iron_chemical_vat/block_single"
}

View File

@@ -0,0 +1,3 @@
{
"parent": "tfmg:item/fire_extinguisher/item"
}

View File

@@ -0,0 +1,3 @@
{
"parent": "tfmg:block/gas_lamp/item"
}

View File

@@ -1,3 +1,3 @@
{
"parent": "tfmg:block/steel_chemical_vat/block_single_window"
"parent": "tfmg:block/steel_chemical_vat/block_single"
}

View File

@@ -110,6 +110,7 @@
"tfmg:electric_motor",
"tfmg:creative_generator",
"tfmg:accumulator",
"tfmg:gas_lamp",
"tfmg:light_bulb",
"tfmg:circular_light",
"tfmg:modern_light",

View File

@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "tfmg:gas_lamp"
}
],
"rolls": 1.0
}
],
"random_sequence": "tfmg:blocks/gas_lamp"
}

View File

@@ -0,0 +1,21 @@
{
"type": "create:filling",
"ingredients": [
{
"item": "tfmg:fire_extinguisher"
},
{
"amount": 1000,
"fluid": "tfmg:carbon_dioxide",
"nbt": {}
}
],
"results": [
{
"item": "tfmg:fire_extinguisher",
"nbt": {
"fill_level": 500
}
}
]
}

View File

@@ -1,6 +1,7 @@
package com.drmangotea.tfmg;
import com.drmangotea.tfmg.content.items.weapons.advanced_potato_cannon.AdvancedPotatoCannonRenderHandler;
import com.drmangotea.tfmg.content.items.weapons.fire_extinguisher.FireExtinguisherRenderHandler;
import com.drmangotea.tfmg.content.items.weapons.flamethrover.FlamethrowerRenderHandler;
import com.drmangotea.tfmg.content.items.weapons.quad_potato_cannon.QuadPotatoCannonRenderHandler;
import com.drmangotea.tfmg.ponder.TFMGPonderPlugin;
@@ -22,6 +23,7 @@ public class TFMGClient {
public static final AdvancedPotatoCannonRenderHandler ADVANCED_POTATO_CANNON_RENDER_HANDLER = new AdvancedPotatoCannonRenderHandler();
public static final FlamethrowerRenderHandler FLAMETHROWER_RENDER_HANDLER = new FlamethrowerRenderHandler();
public static final FireExtinguisherRenderHandler FIRE_EXTINGUISHER_RENDER_HANDLER = new FireExtinguisherRenderHandler();
@SuppressWarnings("removal")
public TFMGClient() {

View File

@@ -136,6 +136,7 @@ public class TFMGShapes {
PUMPJACK_CRANK = shape(0, 0, 0, 16, 8, 16).build(),
INDUSTRIAL_PIPE = shape(4, 0, 4, 12, 16, 12).build(),
FLARESTACK = shape(3, 0, 3, 13, 14, 14).build(),
GAS_LAMP = shape(1, 0, 1, 15, 22, 15).build(),
PUMPJACK_BASE = shape(3, 0, 3, 13, 16, 13).build(),
TRAFFIC_LIGHT = shape(3, 0, 3, 13, 16, 13).build(),
REBAR_FLOOR = shape(0, 4, 0, 16, 12, 16)

View File

@@ -0,0 +1,125 @@
package com.drmangotea.tfmg.base.spark;
import com.drmangotea.tfmg.registry.TFMGEntityTypes;
import com.drmangotea.tfmg.registry.TFMGMobEffects;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleOptions;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.projectile.ThrowableProjectile;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.BaseFireBlock;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.HitResult;
public class DryIceFlake extends ThrowableProjectile {
public DryIceFlake(EntityType<? extends DryIceFlake> entityType, Level level) {
super(entityType, level);
}
public DryIceFlake(Level level, LivingEntity owner) {
super(TFMGEntityTypes.DRY_ICE_FLAKE.get(), owner, level);
}
public DryIceFlake(Level level, double xCoord, double yCoord, double zCoord) {
super(TFMGEntityTypes.DRY_ICE_FLAKE.get(), xCoord, yCoord, zCoord, level);
}
@Override
protected float getGravity(){
return 0.01f;
}
@Override
protected void defineSynchedData() {}
public void tick(){
super.tick();
if (this.tickCount > 20) this.discard();
if(this.level().isClientSide) {
this.level().addParticle(ParticleTypes.SNOWFLAKE, this.getX(), this.getY(), this.getZ(), this.random.nextGaussian() * 0.05D, -this.getDeltaMovement().y * 0.5D, this.random.nextGaussian() * 0.05D);
}
}
private ParticleOptions getParticle() {
return ParticleTypes.SNOWFLAKE;
}
public void handleEntityEvent(byte p_37402_) {
if (p_37402_ == 3) {
ParticleOptions particleoptions = this.getParticle();
for(int i = 0; i < 8; ++i) {
this.level().addParticle(particleoptions, this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D);
}
}
}
protected void onHitBlock(BlockHitResult blockHit) {
super.onHitBlock(blockHit);
if (!this.level().isClientSide) {
Entity owner = this.getOwner();
if (!(owner instanceof Mob) || net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.level(), this)) {
BlockPos hitBlockPos = blockHit.getBlockPos().relative(blockHit.getDirection());
BlockState hitBlockState = this.level().getBlockState(hitBlockPos);
if (hitBlockState.getBlock() instanceof BaseFireBlock) {
this.level().setBlockAndUpdate(hitBlockPos, Blocks.AIR.defaultBlockState());
}
}
}
}
protected void onHitEntity(EntityHitResult entityHit) {
super.onHitEntity(entityHit);
if (!this.level().isClientSide) {
Entity hitEntity = entityHit.getEntity();
hitEntity.extinguishFire();
if (hitEntity.canFreeze()) {
// Apply freezing
int currentFreeze = hitEntity.getTicksFrozen();
int freezeIncrement = 10;
int newFreeze = Math.min(currentFreeze + freezeIncrement, hitEntity.getTicksRequiredToFreeze() + 20); // Slightly overfreeze
hitEntity.setTicksFrozen(newFreeze);
// Damage if fully frozen
if (newFreeze >= hitEntity.getTicksRequiredToFreeze()) {
hitEntity.hurt(this.damageSources().freeze(), 2.0F);
}
// Slow movement and remove hellfire
if (hitEntity instanceof LivingEntity livingEntity) {
livingEntity.addEffect(new MobEffectInstance(
MobEffects.MOVEMENT_SLOWDOWN,
20,
2,
false, false, true
));
livingEntity.removeEffect(TFMGMobEffects.HELLFIRE.get());
}
}
}
}
protected void onHit(HitResult hit) {
super.onHit(hit);
if (!this.level().isClientSide) {
this.level().broadcastEntityEvent(this, (byte)3);
this.discard();
}
}
@SuppressWarnings("unchecked")
public static EntityType.Builder<?> build(EntityType.Builder<?> builder) {
EntityType.Builder<DryIceFlake> entityBuilder = (EntityType.Builder<DryIceFlake>) builder;
return entityBuilder.sized(.25f, .25f);
}
}

View File

@@ -0,0 +1,52 @@
package com.drmangotea.tfmg.base.spark;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Axis;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import org.joml.Matrix3f;
import org.joml.Matrix4f;
@OnlyIn(Dist.CLIENT)
public class DryIceFlakeRenderer extends EntityRenderer<DryIceFlake> {
private static final ResourceLocation TEXTURE_LOCATION = new ResourceLocation("tfmg:textures/entity/dry_ice_flake.png");
private static final RenderType RENDER_TYPE = RenderType.entityCutoutNoCull(TEXTURE_LOCATION);
public DryIceFlakeRenderer(EntityRendererProvider.Context context) {
super(context);
}
protected int getBlockLightLevel(DryIceFlake flake, BlockPos blockPos) {
return 15;
}
public void render(DryIceFlake flake, float p_114081_, float p_114082_, PoseStack stack, MultiBufferSource bufferSource, int p_114085_) {
stack.pushPose();
stack.scale(0.5F, 0.5F, 0.5F);
stack.mulPose(this.entityRenderDispatcher.cameraOrientation());
stack.mulPose(Axis.YP.rotationDegrees(180.0F));
PoseStack.Pose posestack$pose = stack.last();
Matrix4f matrix4f = posestack$pose.pose();
Matrix3f matrix3f = posestack$pose.normal();
VertexConsumer vertexconsumer = bufferSource.getBuffer(RENDER_TYPE);
vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 0, 0, 1);
vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 0, 1, 1);
vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 1, 1, 0);
vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 1, 0, 0);
stack.popPose();
super.render(flake, p_114081_, p_114082_, stack, bufferSource, p_114085_);
}
private static void vertex(VertexConsumer vertexConsumer, Matrix4f p_114091_, Matrix3f p_114092_, int p_114093_, float p_114094_, int p_114095_, int p_114096_, int p_114097_) {
vertexConsumer.vertex(p_114091_, p_114094_ - 0.5F, (float)p_114095_ - 0.25F, 0.0F).color(255, 255, 255, 255).uv((float)p_114096_, (float)p_114097_).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(p_114093_).normal(p_114092_, 0.0F, 1.0F, 0.0F).endVertex();
}
public ResourceLocation getTextureLocation(DryIceFlake p_114078_) {
return TEXTURE_LOCATION;
}
}

View File

@@ -133,7 +133,7 @@ public interface IElectric {
.forGoggles(tooltip);
if (getData().notEnoughtPower) {
CreateLang.text("NOT ENOUGHT POWER")
CreateLang.translate("multimeter.not_enough_power")
.color(Color.RED)
.forGoggles(tooltip, 1);
@@ -186,11 +186,13 @@ public interface IElectric {
CreateLang.text("----------------------------")
.style(ChatFormatting.WHITE)
.forGoggles(tooltip);
CreateLang.text("Network Power Generation: " + TFMGUtils.formatUnits(getNetworkPowerGeneration(), "W"))
CreateLang.translate("multimeter.network_power_generation")
.add(Component.literal(TFMGUtils.formatUnits(getNetworkPowerGeneration(), "W")))
.color(0xcc4b74)
.forGoggles(tooltip, 1);
CreateLang.text("Network Power Consumption: " + TFMGUtils.formatUnits(getNetworkPowerUsage(), "W"))
CreateLang.translate("multimeter.network_power_consumption")
.add(Component.literal(TFMGUtils.formatUnits(getNetworkPowerUsage(), "W")))
.color(0xcc4b74)
.forGoggles(tooltip, 1);
@@ -325,4 +327,4 @@ public interface IElectric {
}
}
}

View File

@@ -3,6 +3,7 @@ package com.drmangotea.tfmg.content.electricity.generators;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.config.TFMGConfigs;
import com.drmangotea.tfmg.content.electricity.base.KineticElectricBlockEntity;
import com.drmangotea.tfmg.registry.TFMGSoundEvents;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
@@ -32,6 +33,26 @@ public class GeneratorBlockEntity extends KineticElectricBlockEntity {
updateNetwork();
data.updateNextTick = false;
}
if (level.isClientSide()) {
float speed = Math.abs(getSpeed());
float minSpeed = TFMGConfigs.common().machines.largeGeneratorMinSpeed.getF();
// Only play sound if above minimum speed
if (speed > minSpeed) {
float maxSpeed = 255f; // Max expected speed
// Normalize speed between 0-1 range (clamped)
float normalizedSpeed = Math.min(1.0f, (speed - minSpeed) / (maxSpeed - minSpeed));
// Volume scales from 0.1 to 0.5 with speed
float volume = 0.1f + (0.4f * normalizedSpeed);
// Pitch scales from 0.8 to 1.2 with speed (Java clamps below 0.5)
float pitch = 0.8f + (0.4f * normalizedSpeed);
TFMGSoundEvents.GENERATOR_HUM.playAt(level, worldPosition, volume, pitch, false);
}
}
}
@Override

View File

@@ -5,6 +5,7 @@ import com.drmangotea.tfmg.config.TFMGConfigs;
import com.drmangotea.tfmg.content.electricity.base.KineticElectricBlockEntity;
import com.drmangotea.tfmg.content.electricity.generators.large_generator.StatorBlock.StatorState;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGSoundEvents;
import net.createmod.catnip.animation.LerpedFloat;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@@ -57,6 +58,26 @@ public class RotorBlockEntity extends KineticElectricBlockEntity {
findStators();
findNextTick = false;
}
if (level.isClientSide()) {
float speed = Math.abs(visualSpeed.getValue());
float minSpeed = TFMGConfigs.common().machines.largeGeneratorMinSpeed.getF();
// Only play sound if above minimum speed
if (speed > minSpeed) {
float maxSpeed = 255f; // Max expected speed
// Normalize speed between 0-1 range (clamped)
float normalizedSpeed = Math.min(1.0f, (speed - minSpeed) / (maxSpeed - minSpeed));
// Volume scales from 0.1 to 1.0 with speed
float volume = 0.1f + (0.9f * normalizedSpeed);
// Pitch scales from 0.5 to 1.0 with speed (Java clamps below 0.5)
float pitch = 0.5f + (0.5f * normalizedSpeed);
TFMGSoundEvents.GENERATOR_HUM.playAt(level, worldPosition, volume, pitch, false);
}
}
}
@Override
@@ -84,9 +105,9 @@ public class RotorBlockEntity extends KineticElectricBlockEntity {
return 0;
float modifier = TFMGConfigs.common().machines.largeGeneratorModifier.getF();
float maxSpeed = TFMGConfigs.common().machines.largeGeneratorMinSpeed.getF();
float minSpeed = TFMGConfigs.common().machines.largeGeneratorMinSpeed.getF();
return (int) Math.max(0, ((Math.abs(getSpeed()) - maxSpeed) * modifier));
return (int) Math.max(0, ((Math.abs(getSpeed()) - minSpeed) * modifier));
}
@Override
@@ -202,4 +223,4 @@ public class RotorBlockEntity extends KineticElectricBlockEntity {
}
}
}

View File

@@ -1,7 +1,8 @@
package com.drmangotea.tfmg.content.electricity.utilities.electric_switch;
import com.drmangotea.tfmg.content.electricity.base.IElectric;
import com.drmangotea.tfmg.content.electricity.utilities.diode.ElectricDiodeBlockEntity;
import com.drmangotea.tfmg.registry.TFMGSoundEvents;
import com.simibubi.create.Create;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.entity.BlockEntityType;
@@ -42,6 +43,14 @@ public class ElectricSwitchBlockEntity extends ElectricDiodeBlockEntity {
updateInFrontNextTick();
updateNextTick();
if (level.isClientSide()) {
if (signal == 0)
TFMGSoundEvents.SWITCH_OFF.playAt(level, worldPosition, 0.8f + Create.RANDOM.nextFloat() * 0.4f, 0.8f + Create.RANDOM.nextFloat() * 0.4f, false);
else
TFMGSoundEvents.SWITCH_ON.playAt(level, worldPosition, 0.8f + Create.RANDOM.nextFloat() * 0.4f, 0.8f + Create.RANDOM.nextFloat() * 0.4f, false);
}
}
public void neighbourChanged() {

View File

@@ -2,11 +2,13 @@ package com.drmangotea.tfmg.content.electricity.utilities.transformer;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.base.blocks.TFMGHorizontalDirectionalBlock;
import com.drmangotea.tfmg.config.TFMGConfigs;
import com.drmangotea.tfmg.content.electricity.base.IElectric;
import com.drmangotea.tfmg.content.electricity.base.UpdateInFrontPacket;
import com.drmangotea.tfmg.content.electricity.base.VoltageAlteringBlockEntity;
import com.drmangotea.tfmg.registry.TFMGPackets;
import com.drmangotea.tfmg.registry.TFMGSoundEvents;
import com.simibubi.create.foundation.utility.CreateLang;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
@@ -63,6 +65,9 @@ public class TransformerBlockEntity extends VoltageAlteringBlockEntity {
updateInFront();
updateInFront = false;
}
if (this.getPowerUsage() > 0 && this.level.isClientSide())
TFMGSoundEvents.ELECTRIC_HUM.playAt(level, worldPosition, 1.0f, 1.0f, false);
}
@Override

View File

@@ -0,0 +1,102 @@
package com.drmangotea.tfmg.content.items.weapons.fire_extinguisher;
import com.drmangotea.tfmg.TFMGClient;
import com.drmangotea.tfmg.base.spark.DryIceFlake;
import com.drmangotea.tfmg.registry.TFMGEntityTypes;
import com.simibubi.create.foundation.item.CustomArmPoseItem;
import net.minecraft.client.model.HumanoidModel;
import net.minecraft.client.player.AbstractClientPlayer;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.UseAnim;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;
public class FireExtinguisherItem extends Item implements CustomArmPoseItem {
public static final int DRY_ICE_CAPACITY = 500;
public FireExtinguisherItem(Properties pProperties) {
super(pProperties);
}
public void onUseTick(Level level, LivingEntity entity, ItemStack stack, int time) {
CompoundTag nbt = stack.getOrCreateTag();
int fillLevel = nbt.getInt("fill_level");
if(fillLevel == 0) return;
DryIceFlake flake = TFMGEntityTypes.DRY_ICE_FLAKE.create(level);
flake.setPos(entity.getX(),entity.getY()+1.2f,entity.getZ());
level.playSound(null, entity.getX(), entity.getY(), entity.getZ(), SoundEvents.FIRE_EXTINGUISH, SoundSource.NEUTRAL, 0.1F, 0.04F);
nbt.putInt("fill_level",fillLevel > 0? fillLevel - 1 : 0);
flake.shoot(entity.getLookAngle().x,entity.getLookAngle().y,entity.getLookAngle().z,0.5f,10.0f);
level.addFreshEntity(flake);
}
public int getUseDuration(ItemStack stack) {
return 696969;
}
@Override
public boolean isBarVisible(ItemStack stack) {
return true;
}
@Override
public int getBarColor(ItemStack stack) {
return 0xffffff;
}
@Override
public int getBarWidth(ItemStack stack) {
float fillLevel = (float)stack.getOrCreateTag().getInt("fill_level") / (float)DRY_ICE_CAPACITY;
return Math.round(13.0f * fillLevel);
}
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
player.startUsingItem(hand);
if (level.isClientSide) {
TFMGClient.FIRE_EXTINGUISHER_RENDER_HANDLER.dontAnimateItem(hand);
}
return InteractionResultHolder.pass(player.getItemInHand(hand));
}
@Override
@Nullable
public HumanoidModel.ArmPose getArmPose(ItemStack stack, AbstractClientPlayer player, InteractionHand hand) {
if (!player.swinging) {
return HumanoidModel.ArmPose.CROSSBOW_HOLD;
}
return null;
}
@Override
public UseAnim getUseAnimation(ItemStack pStack) {
return UseAnim.NONE;
}
}

View File

@@ -0,0 +1,46 @@
package com.drmangotea.tfmg.content.items.weapons.fire_extinguisher;
import com.drmangotea.tfmg.TFMGClient;
import com.simibubi.create.content.equipment.zapper.ShootGadgetPacket;
import com.simibubi.create.content.equipment.zapper.ShootableGadgetRenderHandler;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class FireExtinguisherPacket extends ShootGadgetPacket {
public FireExtinguisherPacket(Vec3 location, InteractionHand hand, boolean self) {
super(location, hand, self);
}
public FireExtinguisherPacket(FriendlyByteBuf buffer) {
super(buffer);
}
@Override
protected void readAdditional(FriendlyByteBuf buffer) {
}
@Override
protected void writeAdditional(FriendlyByteBuf buffer) {
}
@Override
@OnlyIn(Dist.CLIENT)
protected void handleAdditional() {
}
@Override
@OnlyIn(Dist.CLIENT)
protected ShootableGadgetRenderHandler getHandler() {
return TFMGClient.FIRE_EXTINGUISHER_RENDER_HANDLER;
}
}

View File

@@ -0,0 +1,36 @@
package com.drmangotea.tfmg.content.items.weapons.fire_extinguisher;
import com.drmangotea.tfmg.content.items.weapons.flamethrover.FlamethrowerItem;
import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.content.equipment.potatoCannon.PotatoProjectileEntity;
import com.simibubi.create.content.equipment.zapper.ShootableGadgetRenderHandler;
import net.minecraft.client.Minecraft;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.phys.Vec3;
public class FireExtinguisherRenderHandler extends ShootableGadgetRenderHandler {
private float nextPitch;
@Override
protected void playSound(InteractionHand hand, Vec3 position) {
PotatoProjectileEntity.playLaunchSound(Minecraft.getInstance().level, position, nextPitch);
}
@Override
protected boolean appliesTo(ItemStack stack) {
return stack.getItem() instanceof FireExtinguisherItem;
}
@Override
protected void transformTool(PoseStack ms, float flip, float equipProgress, float recoil, float pt) {
}
@Override
protected void transformHand(PoseStack ms, float flip, float equipProgress, float recoil, float pt) {
ms.translate(0,-5,0);
}
}

View File

@@ -4,8 +4,6 @@ import com.drmangotea.tfmg.registry.TFMGFluids;
import com.simibubi.create.content.equipment.wrench.IWrenchable;
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
import com.simibubi.create.foundation.fluid.SmartFluidTank;
import com.simibubi.create.foundation.utility.CreateLang;
import net.createmod.catnip.animation.LerpedFloat;
import net.createmod.catnip.lang.LangBuilder;
@@ -35,441 +33,336 @@ import static com.drmangotea.tfmg.content.machinery.misc.air_intake.AirIntakeBlo
import static com.simibubi.create.content.kinetics.base.DirectionalKineticBlock.FACING;
public class AirIntakeBlockEntity extends KineticBlockEntity implements IWrenchable {
private static final int SMALL_FAN_DIAMETER = 1;
private static final int MEDIUM_FAN_DIAMETER = 2;
private static final int LARGE_FAN_DIAMETER = 3;
int diameter = 1;
boolean isController=false;
public boolean hasShaft=true;
int diameter = SMALL_FAN_DIAMETER;
boolean isController = false;
public boolean hasShaft = true;
boolean isUsedByController = false;
public BlockPos controller;
public List<AirIntakeBlockEntity> blockEntities = new ArrayList<>();
public float maxShaftSpeed =0;
public float maxShaftSpeed = 0;
public float angle = 0;
public LerpedFloat visual_angle = LerpedFloat.angular();
protected FluidTank tankInventory;
protected LazyOptional<IFluidHandler> fluidCapability;
public AirIntakeBlockEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) {
super(typeIn, pos, state);
tankInventory = createInventory();
fluidCapability = LazyOptional.of(() -> tankInventory);
}
public void tick(){
public void tick() {
super.tick();
//if(!level.isClientSide) {
int production = ((int) maxShaftSpeed * ((diameter * diameter))) / 40;
if (tankInventory.getFluidAmount() + production <= tankInventory.getCapacity()) {
//tankInventory.fill(new FluidStack(TFMGFluids.AIR.getSource(), production), IFluidHandler.FluidAction.EXECUTE);
tankInventory.setFluid(new FluidStack(TFMGFluids.AIR.getSource(), production + tankInventory.getFluidAmount()));
// if(controller!=null) {
// ((AirIntakeBlockEntity) level.getBlockEntity(controller)).setChanged();
// ((AirIntakeBlockEntity) level.getBlockEntity(controller)).sendData();
// }
}
// }
////////////////
produceAir();
updateVisuals();
updateBlockState();
validateController();
updateShaftSpeed();
validateMultiblock();
}
if(isUsedByController) {
private void produceAir() {
int production = ((int) maxShaftSpeed * (diameter * diameter)) / 40;
if (tankInventory.getFluidAmount() + production <= tankInventory.getCapacity()) {
tankInventory.setFluid(new FluidStack(TFMGFluids.AIR.getSource(), production + tankInventory.getFluidAmount()));
}
if (isUsedByController) {
refreshCapability();
sendData();
setChanged();
}
}
if(diameter == 3){
private void updateVisuals() {
if (diameter == LARGE_FAN_DIAMETER) {
visual_angle.chase(angle, 0.1f, LerpedFloat.Chaser.EXP);
visual_angle.tickChaser();
}
angle+=maxShaftSpeed/2;
angle += maxShaftSpeed / 2;
angle %= 360;
}
if(isUsedByController)
blockEntities.clear();
if(!this.getBlockState().getValue(INVISIBLE)){
if(isController||isUsedByController){
level.setBlock(this.getBlockPos(),this.getBlockState().setValue(INVISIBLE,true),2);
private void updateBlockState() {
if (!this.getBlockState().getValue(INVISIBLE)) {
if (isController || isUsedByController) {
level.setBlock(this.getBlockPos(), this.getBlockState().setValue(INVISIBLE, true), 2);
}
}
if(!isController&&!isUsedByController)
level.setBlock(this.getBlockPos(),this.getBlockState().setValue(INVISIBLE,false),2);
if (!isController && !isUsedByController) {
level.setBlock(this.getBlockPos(), this.getBlockState().setValue(INVISIBLE, false), 2);
}
}
if(controller == null)
controller = this.getBlockPos();
diameter =getPossibleDiameter();
if(controller == this.getBlockPos()) {
private void validateController() {
if (controller == null) controller = this.getBlockPos();
diameter = getPossibleDiameter();
if (controller == this.getBlockPos()) {
isUsedByController = false;
} else {
isUsedByController = true;
isController = false;
}
if(diameter ==1) {
if (diameter == SMALL_FAN_DIAMETER) {
isController = false;
}
if(!(level.getBlockEntity(controller) instanceof AirIntakeBlockEntity)) {
if (!(level.getBlockEntity(controller) instanceof AirIntakeBlockEntity)) {
isUsedByController = false;
controller = this.getBlockPos();
} else {
if(!(((AirIntakeBlockEntity) level.getBlockEntity(controller)).isController))
isUsedByController = false;
} else if (!(((AirIntakeBlockEntity) level.getBlockEntity(controller)).isController)) {
isUsedByController = false;
}
//else
// if(!(((AirIntakeBlockEntity) level.getBlockEntity(controller)).isController))
// controller = this.getBlockPos();
if(controller!=null) {
if(level.getBlockEntity(controller)!=null)
if(((AirIntakeBlockEntity)level.getBlockEntity(controller)).diameter==2) {
int x = Math.abs(this.getBlockPos().getX() - controller.getX());
int y = Math.abs(this.getBlockPos().getY() - controller.getY());
int z = Math.abs(this.getBlockPos().getZ() - controller.getZ());
validateControllerDistance();
}
int distanceFromController = x + y + z;
if (x > 1 || y > 1 || z > 1) {
isUsedByController = false;
controller = this.getBlockPos();
}
}
if(level.getBlockEntity(controller)!=null)
if(((AirIntakeBlockEntity)level.getBlockEntity(controller)).diameter==1) {
private void validateControllerDistance() {
if (controller == null || level.getBlockEntity(controller) == null) return;
AirIntakeBlockEntity controllerBE = (AirIntakeBlockEntity) level.getBlockEntity(controller);
if (controllerBE.diameter == MEDIUM_FAN_DIAMETER) {
int x = Math.abs(this.getBlockPos().getX() - controller.getX());
int y = Math.abs(this.getBlockPos().getY() - controller.getY());
int z = Math.abs(this.getBlockPos().getZ() - controller.getZ());
if (x > 1 || y > 1 || z > 1) {
isUsedByController = false;
controller = this.getBlockPos();
}
} else if (controllerBE.diameter == SMALL_FAN_DIAMETER) {
isUsedByController = false;
controller = this.getBlockPos();
}
////////////////////////
if(diameter == 1){
maxShaftSpeed = Math.abs(getSpeed());
}else {
maxShaftSpeed = Math.abs(getSpeed());
List<Float> speeds = new ArrayList<>();
//
for (AirIntakeBlockEntity be : blockEntities) {
speeds.add(Math.abs(be.getSpeed()));
//
}
//
for(float testedSpeed : speeds){
if(testedSpeed> maxShaftSpeed)
maxShaftSpeed = testedSpeed;
}
// maxShaftSpeed = getSpeed();
}
if(isUsedByController)
return;
if(diameter ==2){
if(blockEntities.toArray().length!=4)
return;
}
if(diameter ==3){
if(blockEntities.toArray().length!=9)
return;
}
}
private void updateShaftSpeed() {
maxShaftSpeed = Math.abs(getSpeed());
if (diameter > SMALL_FAN_DIAMETER) {
for (AirIntakeBlockEntity be : blockEntities) {
float testedSpeed = Math.abs(be.getSpeed());
if (testedSpeed > maxShaftSpeed) {
maxShaftSpeed = testedSpeed;
}
}
}
}
private void validateMultiblock() {
if (isUsedByController) return;
if ((diameter == MEDIUM_FAN_DIAMETER && blockEntities.size() != MEDIUM_FAN_DIAMETER * MEDIUM_FAN_DIAMETER)
|| (diameter == LARGE_FAN_DIAMETER && blockEntities.size() != LARGE_FAN_DIAMETER * LARGE_FAN_DIAMETER)) return;
}
@Override
public void invalidate() {
super.invalidate();
fluidCapability.invalidate();
}
public InteractionResult onWrenched(BlockState state, UseOnContext context){
public InteractionResult onWrenched(BlockState state, UseOnContext context) {
Direction direction = context.getClickedFace();
if(direction == getBlockState().getValue(FACING).getOpposite()) {
if (direction == getBlockState().getValue(FACING).getOpposite()) {
hasShaft = !hasShaft;
}
return InteractionResult.SUCCESS;
}
public void setController(BlockPos controllerPos) {
// isUsedByController = true;
controller = controllerPos;
controller = controllerPos;
}
@Nonnull
@Override
@SuppressWarnings("removal")
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, Direction side) {
if (!fluidCapability.isPresent()) {
refreshCapability();
sendData();
setChanged();
}
if (cap == ForgeCapabilities.FLUID_HANDLER)
return fluidCapability.cast();
if (cap == ForgeCapabilities.FLUID_HANDLER) return fluidCapability.cast();
return super.getCapability(cap, side);
}
private void refreshCapability() {
IFluidHandler handlerForCapability;
if (controller == null || controller == this.getBlockPos()
) {
if (controller == null || controller == this.getBlockPos()) {
handlerForCapability = tankInventory;
} else
if(((AirIntakeBlockEntity) level.getBlockEntity(controller))!=null) {
} else if (level.getBlockEntity(controller) != null) {
handlerForCapability = ((AirIntakeBlockEntity) level.getBlockEntity(controller)).tankInventory;
}else handlerForCapability = tankInventory;
} else {
handlerForCapability = tankInventory;
}
LazyOptional<IFluidHandler> oldCap = fluidCapability;
IFluidHandler finalHandlerForCapability = handlerForCapability;
fluidCapability = LazyOptional.of(() -> finalHandlerForCapability);
//oldCap.invalidate();
}
public int getPossibleDiameter() {
if (controller != this.getBlockPos()) return SMALL_FAN_DIAMETER;
boolean canBeMedium = checkMediumDiameter();
boolean canBeLarge = checkLargeDiameter();
public int getPossibleDiameter(){
if(controller !=this.getBlockPos())
return 1;
BlockPos checkedPos = this.getBlockPos();
Direction direction = this.getBlockState().getValue(FACING);
List<BlockPos> checkedPosses = new ArrayList<>();
checkedPos = this.getBlockPos();
boolean canBeMedium = true;
for(int x = 0;x < 2; x++){
for(int z = 0;z < 2; z++){
checkedPosses.add(checkedPos);
if(direction.getAxis().isHorizontal()) {
checkedPos = checkedPos.above();
}else checkedPos = checkedPos.east();
}
if(direction.getAxis().isHorizontal()) {
checkedPos = checkedPos.below(2);
checkedPos = checkedPos.relative(direction.getClockWise());
} else {
checkedPos = checkedPos.west(2);
checkedPos = checkedPos.south();
}
if (canBeLarge) {
setupMultiblock(LARGE_FAN_DIAMETER);
return LARGE_FAN_DIAMETER;
}
List<BlockPos> checkedPossesLarge = new ArrayList<>();
checkedPos = this.getBlockPos();
boolean canBeLarge = true;
for(int x = 0;x < 3; x++){
for(int z = 0;z < 3; z++){
checkedPossesLarge.add(checkedPos);
if(direction.getAxis().isHorizontal()) {
checkedPos = checkedPos.above();
}else checkedPos = checkedPos.east();
}
if(direction.getAxis().isHorizontal()) {
checkedPos = checkedPos.below(3);
checkedPos = checkedPos.relative(direction.getClockWise());
} else {
checkedPos = checkedPos.west(3);
checkedPos = checkedPos.south();
}
}
//LARGE
for(BlockPos pos : checkedPossesLarge){
if(!(level.getBlockEntity(pos) instanceof AirIntakeBlockEntity)) {
canBeLarge = false;
break;
}
// ((AirIntakeBlockEntity) level.getBlockEntity(pos)).controller = this.getBlockPos();
AirIntakeBlockEntity checkedBE = (AirIntakeBlockEntity) level.getBlockEntity(pos);
//if(checkedBE.diameter<3)
// ((AirIntakeBlockEntity) level.getBlockEntity(pos)).isController = false;
// if(pos!=this.getBlockPos())
// if(checkedBE.isController) {
//
//
// canBeLarge = false;
// break;
// }
if(checkedBE.getBlockState().getValue(FACING) != this.getBlockState().getValue(FACING)) {
canBeLarge = false;
break;
}
//if(pos!=this.getBlockPos())
// ((AirIntakeBlockEntity) level.getBlockEntity(pos)).isUsedByController = true;
}
//MEDIUM
for(BlockPos pos : checkedPosses){
if(!(level.getBlockEntity(pos) instanceof AirIntakeBlockEntity)) {
canBeMedium = false;
break;
}
// ((AirIntakeBlockEntity) level.getBlockEntity(pos)).controller = this.getBlockPos();
AirIntakeBlockEntity checkedBE = (AirIntakeBlockEntity) level.getBlockEntity(pos);
if(pos!=this.getBlockPos())
if(checkedBE.isController) {
canBeMedium = false;
break;
}
if(checkedBE.getBlockState().getValue(FACING) != this.getBlockState().getValue(FACING)) {
canBeMedium = false;
break;
}
//if(pos!=this.getBlockPos())
// ((AirIntakeBlockEntity) level.getBlockEntity(pos)).isUsedByController = true;
}
if(canBeLarge) {
this.blockEntities.clear();
for(BlockPos pos : checkedPossesLarge) {
//if(((AirIntakeBlockEntity) level.getBlockEntity(pos)).isUsedByController&&((AirIntakeBlockEntity) level.getBlockEntity(pos)).controller!=this.getBlockPos()&&pos!=this.getBlockPos()) {
// controller = this.getBlockPos();
// isController = false;
// return 1;
//}
if((((AirIntakeBlockEntity) level.getBlockEntity(pos)).isUsedByController&&((AirIntakeBlockEntity) level.getBlockEntity(pos)).controller!=this.getBlockPos()&&pos!=this.getBlockPos())||isController) {
((AirIntakeBlockEntity) level.getBlockEntity(pos)).isUsedByController = true;
((AirIntakeBlockEntity) level.getBlockEntity(pos)).isController = false;
((AirIntakeBlockEntity) level.getBlockEntity(pos)).controller =this.getBlockPos();
}
((AirIntakeBlockEntity) level.getBlockEntity(pos)).setController(this.getBlockPos());
this.blockEntities.add((AirIntakeBlockEntity) level.getBlockEntity(pos));
}
controller = this.getBlockPos();
isController = true;
return 3;
}
if(canBeMedium) {
this.blockEntities.clear();
for(BlockPos pos : checkedPosses) {
if(((AirIntakeBlockEntity) level.getBlockEntity(pos)).isUsedByController&&((AirIntakeBlockEntity) level.getBlockEntity(pos)).controller!=this.getBlockPos()&&pos!=this.getBlockPos()) {
controller = this.getBlockPos();
isController = false;
return 1;
}
((AirIntakeBlockEntity) level.getBlockEntity(pos)).setController(this.getBlockPos());
this.blockEntities.add((AirIntakeBlockEntity) level.getBlockEntity(pos));
}
controller = this.getBlockPos();
isController = true;
return 2;
if (canBeMedium) {
setupMultiblock(MEDIUM_FAN_DIAMETER);
return MEDIUM_FAN_DIAMETER;
}
controller = this.getBlockPos();
isController = false;
return 1;
return SMALL_FAN_DIAMETER;
}
private boolean checkMediumDiameter() {
List<BlockPos> checkedPosses = new ArrayList<>();
BlockPos checkedPos = this.getBlockPos();
Direction direction = this.getBlockState().getValue(FACING);
for (int x = 0; x < MEDIUM_FAN_DIAMETER; x++) {
for (int z = 0; z < MEDIUM_FAN_DIAMETER; z++) {
checkedPosses.add(checkedPos);
if (direction.getAxis().isHorizontal()) {
checkedPos = checkedPos.above();
} else {
checkedPos = checkedPos.east();
}
}
if (direction.getAxis().isHorizontal()) {
checkedPos = checkedPos.below(MEDIUM_FAN_DIAMETER);
checkedPos = checkedPos.relative(direction.getClockWise());
} else {
checkedPos = checkedPos.west(MEDIUM_FAN_DIAMETER);
checkedPos = checkedPos.south();
}
}
for (BlockPos pos : checkedPosses) {
if (!(level.getBlockEntity(pos) instanceof AirIntakeBlockEntity)) return false;
AirIntakeBlockEntity checkedBE = (AirIntakeBlockEntity) level.getBlockEntity(pos);
if (pos != this.getBlockPos() && checkedBE.isController) return false;
if (checkedBE.getBlockState().getValue(FACING) != this.getBlockState().getValue(FACING)) return false;
}
return true;
}
private boolean checkLargeDiameter() {
List<BlockPos> checkedPosses = new ArrayList<>();
BlockPos checkedPos = this.getBlockPos();
Direction direction = this.getBlockState().getValue(FACING);
for (int x = 0; x < LARGE_FAN_DIAMETER; x++) {
for (int z = 0; z < LARGE_FAN_DIAMETER; z++) {
checkedPosses.add(checkedPos);
if (direction.getAxis().isHorizontal()) {
checkedPos = checkedPos.above();
} else {
checkedPos = checkedPos.east();
}
}
if (direction.getAxis().isHorizontal()) {
checkedPos = checkedPos.below(LARGE_FAN_DIAMETER);
checkedPos = checkedPos.relative(direction.getClockWise());
} else {
checkedPos = checkedPos.west(LARGE_FAN_DIAMETER);
checkedPos = checkedPos.south();
}
}
for (BlockPos pos : checkedPosses) {
if (!(level.getBlockEntity(pos) instanceof AirIntakeBlockEntity)) return false;
AirIntakeBlockEntity checkedBE = (AirIntakeBlockEntity) level.getBlockEntity(pos);
if (checkedBE.getBlockState().getValue(FACING) != this.getBlockState().getValue(FACING)) return false;
}
return true;
}
private void setupMultiblock(int diameter) {
this.blockEntities.clear();
List<BlockPos> positions = getMultiblockPositions(diameter);
for (BlockPos pos : positions) {
AirIntakeBlockEntity be = (AirIntakeBlockEntity) level.getBlockEntity(pos);
if (be.isUsedByController && be.controller != this.getBlockPos() && pos != this.getBlockPos()) {
be.isUsedByController = true;
be.isController = false;
be.controller = this.getBlockPos();
}
be.setController(this.getBlockPos());
this.blockEntities.add(be);
}
controller = this.getBlockPos();
isController = true;
}
private List<BlockPos> getMultiblockPositions(int diameter) {
List<BlockPos> positions = new ArrayList<>();
BlockPos checkedPos = this.getBlockPos();
Direction direction = this.getBlockState().getValue(FACING);
int size = diameter == MEDIUM_FAN_DIAMETER ? MEDIUM_FAN_DIAMETER : LARGE_FAN_DIAMETER;
for (int x = 0; x < size; x++) {
for (int z = 0; z < size; z++) {
positions.add(checkedPos);
if (direction.getAxis().isHorizontal()) {
checkedPos = checkedPos.above();
} else {
checkedPos = checkedPos.east();
}
}
if (direction.getAxis().isHorizontal()) {
checkedPos = checkedPos.below(size);
checkedPos = checkedPos.relative(direction.getClockWise());
} else {
checkedPos = checkedPos.west(size);
checkedPos = checkedPos.south();
}
}
return positions;
}
@Override
protected AABB createRenderBoundingBox() {
return new AABB(this.getBlockPos()).inflate(3);
}
@Override
@SuppressWarnings("removal")
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
//--Fluid Info--//
LazyOptional<IFluidHandler> handler = this.getCapability(ForgeCapabilities.FLUID_HANDLER);
Optional<IFluidHandler> resolve = handler.resolve();
if (!resolve.isPresent())
return false;
if (!resolve.isPresent()) return false;
IFluidHandler tank = resolve.get();
if (tank.getTanks() == 0)
return false;
if (tank.getTanks() == 0) return false;
LangBuilder mb = CreateLang.translate("generic.unit.millibuckets");
boolean isEmpty = true;
for (int i = 0; i < tank.getTanks(); i++) {
FluidStack fluidStack = tank.getFluidInTank(i);
if (fluidStack.isEmpty())
continue;
if (fluidStack.isEmpty()) continue;
CreateLang.fluidName(fluidStack)
.style(ChatFormatting.GRAY)
@@ -489,13 +382,11 @@ public class AirIntakeBlockEntity extends KineticBlockEntity implements IWrencha
}
if (tank.getTanks() > 1) {
if (isEmpty)
tooltip.remove(tooltip.size() - 1);
if (isEmpty) tooltip.remove(tooltip.size() - 1);
return true;
}
if (!isEmpty)
return true;
if (!isEmpty) return true;
CreateLang.translate("gui.goggles.fluid_container.capacity")
.add(CreateLang.number(tank.getTankCapacity(0))
@@ -503,57 +394,40 @@ public class AirIntakeBlockEntity extends KineticBlockEntity implements IWrencha
.style(ChatFormatting.DARK_GREEN))
.style(ChatFormatting.DARK_GRAY)
.forGoggles(tooltip, 1);
return true;
}
protected SmartFluidTank createInventory() {
return new SmartFluidTank(8000, this::onFluidStackChanged){
return new SmartFluidTank(8000, this::onFluidStackChanged) {
@Override
public boolean isFluidValid(FluidStack stack) {
return stack.getFluid().isSame(TFMGFluids.AIR.getSource());
}
// @Override
// public FluidStack drain(FluidStack resource, FluidAction action) {
// return FluidStack.EMPTY;
// }
};
}
protected void onFluidStackChanged(FluidStack newFluidStack) {
setChanged();
sendData();
//if(((AirIntakeBlockEntity) level.getBlockEntity(controller))!=null) {
// ((AirIntakeBlockEntity) level.getBlockEntity(controller)).setChanged();
// ((AirIntakeBlockEntity) level.getBlockEntity(controller)).sendData();
//}
setChanged();
sendData();
}
@Override
protected void read(CompoundTag compound, boolean clientPacket) {
super.read(compound, clientPacket);
diameter = compound.getInt("Diameter");
isController = compound.getBoolean("IsController");
isUsedByController = compound.getBoolean("IsUsed");
hasShaft = compound.getBoolean("HasShaft");
tankInventory.readFromNBT(compound.getCompound("TankContent"));
}
@Override
public void write(CompoundTag compound, boolean clientPacket) {
super.write(compound, clientPacket);
compound.putInt("Diameter", diameter);
compound.putBoolean("IsController", isController);
compound.putBoolean("IsUsed", isUsedByController);
compound.putBoolean("HasShaft", hasShaft);
compound.put("TankContent", tankInventory.writeToNBT(new CompoundTag()));
}
}

View File

@@ -0,0 +1,56 @@
package com.drmangotea.tfmg.content.machinery.misc.gas_lamp;
import com.drmangotea.tfmg.base.TFMGShapes;
import com.drmangotea.tfmg.content.machinery.misc.flarestack.FlarestackBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.content.equipment.wrench.IWrenchable;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.core.BlockPos;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
import javax.annotation.Nullable;
public class GasLampBlock extends Block implements IBE<GasLampBlockEntity> {
public static final BooleanProperty LIT = BlockStateProperties.LIT;
public GasLampBlock(Properties properties) {
super(properties);
this.registerDefaultState(this.stateDefinition.any().setValue(LIT, false));
}
@Override
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
return TFMGShapes.GAS_LAMP;
}
@Nullable
public BlockState getStateForPlacement(BlockPlaceContext context) {
return this.defaultBlockState().setValue(LIT, Boolean.FALSE);
}
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_51305_) {
p_51305_.add(LIT);
}
@Override
public Class<GasLampBlockEntity> getBlockEntityClass() {
return GasLampBlockEntity.class;
}
@Override
public BlockEntityType<? extends GasLampBlockEntity> getBlockEntityType() {
return TFMGBlockEntities.GAS_LAMP.get();
}
}

View File

@@ -0,0 +1,115 @@
package com.drmangotea.tfmg.content.machinery.misc.gas_lamp;
import com.drmangotea.tfmg.base.TFMGUtils;
import com.drmangotea.tfmg.registry.TFMGTags;
import com.simibubi.create.api.equipment.goggles.IHaveGoggleInformation;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import com.simibubi.create.foundation.fluid.SmartFluidTank;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.ForgeCapabilities;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.templates.FluidTank;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
public class GasLampBlockEntity extends SmartBlockEntity implements IHaveGoggleInformation {
protected LazyOptional<IFluidHandler> fluidCapability;
public FluidTank tankInventory;
public int lightTimer = 0;
public GasLampBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
tankInventory = createInventory();
fluidCapability = LazyOptional.of(() -> tankInventory);
}
protected SmartFluidTank createInventory() {
return new SmartFluidTank(1000, this::onFluidStackChanged) {
@Override
public boolean isFluidValid(FluidStack stack) {
return stack.getFluid().is(TFMGTags.TFMGFluidTags.FLAMMABLE.tag)||
stack.getFluid().is(TFMGTags.TFMGFluidTags.FUEL.tag);
}
};
}
@Nonnull
@Override
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) {
if (cap == ForgeCapabilities.FLUID_HANDLER)
return fluidCapability.cast();
return super.getCapability(cap, side);
}
@Override
public void invalidate() {
super.invalidate();
fluidCapability.invalidate();
}
protected void onFluidStackChanged(FluidStack newFluidStack) {
if (!hasLevel()) return;
sendData();
setChanged();
}
@Override
@SuppressWarnings("removal")
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
return TFMGUtils.createFluidTooltip(this, tooltip);
}
@Override
public void tick() {
super.tick();
if (tankInventory.isEmpty() || !tankInventory.isFluidValid(tankInventory.getFluid())) {
level.setBlock(getBlockPos(), this.getBlockState()
.setValue(GasLampBlock.LIT, false), 2);
return;
}
// drain rate: 5mB/t
if (tankInventory.getFluidAmount() > 0) {
tankInventory.drain(5, IFluidHandler.FluidAction.EXECUTE);
lightTimer = 100;
}
if (lightTimer > 0) {
lightTimer--;
level.setBlock(getBlockPos(), this.getBlockState()
.setValue(GasLampBlock.LIT, true), 2);
}
}
@Override
protected void read(CompoundTag compound, boolean clientPacket) {
super.read(compound, clientPacket);
tankInventory.readFromNBT(compound.getCompound("TankContent"));
}
@Override
public void write(CompoundTag compound, boolean clientPacket) {
super.write(compound, clientPacket);
compound.put("TankContent", tankInventory.writeToNBT(new CompoundTag()));
}
@Override
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {}
}

View File

@@ -0,0 +1,32 @@
package com.drmangotea.tfmg.content.machinery.misc.gas_lamp;
import com.drmangotea.tfmg.content.machinery.misc.flarestack.FlarestackBlock;
import com.simibubi.create.foundation.data.SpecialBlockStateGen;
import com.tterrag.registrate.providers.DataGenContext;
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.client.model.generators.ModelFile;
import static com.simibubi.create.foundation.data.AssetLookup.partialBaseModel;
public class GasLampGenerator extends SpecialBlockStateGen {
@Override
protected int getXRotation(BlockState state) {
return 0;
}
@Override
protected int getYRotation(BlockState state) {
return 0;
}
@Override
public <T extends Block> ModelFile getModel(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
BlockState state) {
return state.getValue(FlarestackBlock.LIT) ? partialBaseModel(ctx, prov, "lit")
: partialBaseModel(ctx, prov);
}
}

View File

@@ -1,5 +1,6 @@
package com.drmangotea.tfmg.datagen.recipes.values.create;
import com.drmangotea.tfmg.content.items.weapons.fire_extinguisher.FireExtinguisherItem;
import com.drmangotea.tfmg.datagen.recipes.TFMGProcessingRecipeGen;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGFluids;
@@ -7,6 +8,7 @@ import com.drmangotea.tfmg.registry.TFMGItems;
import com.simibubi.create.AllRecipeTypes;
import net.minecraft.data.PackOutput;
import net.minecraft.tags.ItemTags;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import static com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider.F.*;
@@ -81,8 +83,20 @@ public class TFMGFillingRecipeGen extends TFMGProcessingRecipeGen {
.require(Items.BUCKET)
.require(hotAir(), 1000)
.output(hotAirTank())
),
FILLED_FIRE_EXTINGUISHER = create("filled_fire_extinguisher", b -> b
.require(TFMGItems.FIRE_EXTINGUISHER)
.require(carbonDioxide(), 1000)
.output(createFilledExtinguisherStack())
);
// Helper method to create the filled extinguisher ItemStack
private static ItemStack createFilledExtinguisherStack() {
ItemStack stack = new ItemStack(TFMGItems.FIRE_EXTINGUISHER.get());
stack.getOrCreateTag().putInt("fill_level", FireExtinguisherItem.DRY_ICE_CAPACITY);
return stack;
}
public TFMGFillingRecipeGen(PackOutput output) {
super(output);
@@ -93,4 +107,4 @@ public class TFMGFillingRecipeGen extends TFMGProcessingRecipeGen {
return AllRecipeTypes.FILLING;
}
}
}

View File

@@ -81,6 +81,7 @@ import com.drmangotea.tfmg.content.machinery.misc.concrete_hose.ConcreteHoseRend
import com.drmangotea.tfmg.content.machinery.misc.exhaust.ExhaustBlockEntity;
import com.drmangotea.tfmg.content.machinery.misc.firebox.FireboxBlockEntity;
import com.drmangotea.tfmg.content.machinery.misc.flarestack.FlarestackBlockEntity;
import com.drmangotea.tfmg.content.machinery.misc.gas_lamp.GasLampBlockEntity;
import com.drmangotea.tfmg.content.machinery.misc.machine_input.MachineInputBlockEntity;
import com.drmangotea.tfmg.content.machinery.misc.smokestack.SmokestackBlockEntity;
import com.drmangotea.tfmg.content.machinery.misc.winding_machine.WindingMachineBlockEntity;
@@ -402,6 +403,11 @@ public class TFMGBlockEntities {
.validBlocks(TFMGBlocks.FLARESTACK)
.register();
public static final BlockEntityEntry<GasLampBlockEntity> GAS_LAMP = REGISTRATE
.blockEntity("gas_lamp", GasLampBlockEntity::new)
.validBlocks(TFMGBlocks.GAS_LAMP)
.register();
public static final BlockEntityEntry<BracketedKineticBlockEntity> TFMG_COGWHEEL = REGISTRATE
.blockEntity("tfmg_simple_kinetic", BracketedKineticBlockEntity::new)
.visual(() -> TFMGCogwheelVisual::create, true)

View File

@@ -1,6 +1,7 @@
package com.drmangotea.tfmg.registry;
import com.drmangotea.tfmg.TFMGClient;
import com.drmangotea.tfmg.base.*;
import com.drmangotea.tfmg.base.blocks.TFMGDirectionalBlock;
import com.drmangotea.tfmg.base.blocks.TFMGVanillaBlockStates;
@@ -35,6 +36,7 @@ import com.drmangotea.tfmg.content.electricity.generators.creative_generator.Cre
import com.drmangotea.tfmg.content.electricity.generators.large_generator.RotorBlock;
import com.drmangotea.tfmg.content.electricity.generators.large_generator.StatorBlock;
import com.drmangotea.tfmg.content.electricity.generators.large_generator.StatorGenerator;
import com.drmangotea.tfmg.content.machinery.misc.gas_lamp.GasLampBlock;
import com.drmangotea.tfmg.content.electricity.lights.LampGenerator;
import com.drmangotea.tfmg.content.electricity.lights.LightBulbBlock;
import com.drmangotea.tfmg.content.electricity.lights.neon_tube.NeonTubeBlock;
@@ -49,7 +51,6 @@ import com.drmangotea.tfmg.content.electricity.utilities.diode.EncasedDiodeBlock
import com.drmangotea.tfmg.content.electricity.utilities.electric_motor.ElectricMotorBlock;
import com.drmangotea.tfmg.content.electricity.utilities.electric_pump.ElectricPumpBlock;
import com.drmangotea.tfmg.content.electricity.utilities.electric_switch.ElectricSwitchBlock;
import com.drmangotea.tfmg.content.electricity.utilities.fuse_block.FuseBlock;
import com.drmangotea.tfmg.content.electricity.utilities.polarizer.PolarizerBlock;
import com.drmangotea.tfmg.content.electricity.utilities.potentiometer.PotentiometerBlock;
import com.drmangotea.tfmg.content.electricity.utilities.potentiometer.EncasedPotentiometerBlock;
@@ -90,6 +91,7 @@ import com.drmangotea.tfmg.content.machinery.misc.exhaust.ExhaustBlock;
import com.drmangotea.tfmg.content.machinery.misc.firebox.FireboxBlock;
import com.drmangotea.tfmg.content.machinery.misc.flarestack.FlarestackBlock;
import com.drmangotea.tfmg.content.machinery.misc.flarestack.FlarestackGenerator;
import com.drmangotea.tfmg.content.machinery.misc.gas_lamp.GasLampGenerator;
import com.drmangotea.tfmg.content.machinery.misc.machine_input.MachineInputBlock;
import com.drmangotea.tfmg.content.machinery.misc.smokestack.SmokestackBlock;
import com.drmangotea.tfmg.content.machinery.misc.smokestack.SmokestackGenerator;
@@ -114,7 +116,6 @@ import com.drmangotea.tfmg.content.machinery.vat.base.VatItem;
import com.drmangotea.tfmg.content.machinery.vat.base.VatModel;
import com.drmangotea.tfmg.content.machinery.vat.electrode_holder.ElectrodeHolderBlock;
import com.drmangotea.tfmg.content.machinery.vat.industrial_mixer.IndustrialMixerBlock;
import com.simibubi.create.AllMountedStorageTypes;
import com.simibubi.create.AllTags;
import com.simibubi.create.api.stress.BlockStressValues;
import com.simibubi.create.content.contraptions.bearing.StabilizedBearingMovementBehaviour;
@@ -148,6 +149,7 @@ import net.minecraftforge.common.Tags;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Supplier;
import static com.drmangotea.tfmg.TFMG.REGISTRATE;
import static com.drmangotea.tfmg.base.TFMGBuilderTransformers.*;
@@ -1064,7 +1066,21 @@ public class TFMGBlocks {
.item(AccumulatorItem::new)
.build()
.register();
;
public static final BlockEntry<GasLampBlock> GAS_LAMP =
REGISTRATE.block("gas_lamp", GasLampBlock::new)
.initialProperties(SharedProperties::copperMetal)
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.addLayer(() -> RenderType::cutoutMipped)
.properties(p -> p
.lightLevel(s -> s.getValue(GasLampBlock.LIT) ? 15 : 0)
.noOcclusion())
.blockstate(new GasLampGenerator()::generate)
.transform(pickaxeOnly())
.item()
.transform(customItemModel())
.register();
public static final BlockEntry<LightBulbBlock> LIGHT_BULB =
REGISTRATE.block("light_bulb", p -> new LightBulbBlock(p, TFMGBlockEntities.LIGHT_BULB, TFMGShapes.LIGHT_BULB))
.initialProperties(() -> Blocks.IRON_BLOCK)

View File

@@ -22,7 +22,6 @@ import com.tterrag.registrate.util.nullness.NonNullFunction;
import com.tterrag.registrate.util.nullness.NonNullSupplier;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.ItemEntityRenderer;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
@@ -69,6 +68,9 @@ public class TFMGEntityTypes {
register("lithium_spark", LithiumSpark::new, () -> LithiumSparkRenderer::new,
MobCategory.MISC, 80, 20, true, true, LithiumSpark::build).register();
public static final EntityEntry<DryIceFlake> DRY_ICE_FLAKE =
register("dry_ice_flake", DryIceFlake::new, () -> DryIceFlakeRenderer::new,
MobCategory.MISC, 4, 20, true, true, DryIceFlake::build).register();

View File

@@ -22,6 +22,7 @@ import com.drmangotea.tfmg.content.items.weapons.advanced_potato_cannon.Advanced
import com.drmangotea.tfmg.content.items.weapons.explosives.pipe_bomb.PipeBombItem;
import com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades.ThermiteGrenade;
import com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades.ThermiteGrenadeItem;
import com.drmangotea.tfmg.content.items.weapons.fire_extinguisher.FireExtinguisherItem;
import com.drmangotea.tfmg.content.items.weapons.flamethrover.FlamethrowerItem;
import com.drmangotea.tfmg.content.items.weapons.lithium_blade.LitLithiumBladeItem;
import com.drmangotea.tfmg.content.items.weapons.lithium_blade.LithiumBladeItem;
@@ -270,6 +271,12 @@ public class TFMGItems {
.properties(p -> p.stacksTo(1))
.register();
public static final ItemEntry<FireExtinguisherItem> FIRE_EXTINGUISHER =
REGISTRATE.item("fire_extinguisher", FireExtinguisherItem::new)
.model(AssetLookup.itemModelWithPartials())
.properties(p -> p.stacksTo(1))
.register();
public static final Map<String, RegistryEntry<MultimeterItem>> MULTIMETERS = multimeters();

View File

@@ -44,18 +44,41 @@ public class TFMGSoundEvents {
public static final TFMGSoundEvents.SoundEntry
ENGINE = create("engine")
ENGINE = create("engine")
.subtitle("Engine Sounds")
.category(SoundSource.BLOCKS)
.attenuationDistance(10)
.build(),
DIESEL_ENGINE = create("diesel_engine")
.subtitle("Diesel Engine Sounds")
.category(SoundSource.BLOCKS)
.attenuationDistance(10)
.build();
DIESEL_ENGINE = create("diesel_engine")
.subtitle("Diesel Engine Sounds")
.category(SoundSource.BLOCKS)
.attenuationDistance(10)
.build(),
ELECTRIC_HUM = create("electric_hum")
.subtitle("Electric hum")
.category(SoundSource.BLOCKS)
.attenuationDistance(10)
.build(),
GENERATOR_HUM = create("generator_hum")
.subtitle("Generator hum")
.category(SoundSource.BLOCKS)
.attenuationDistance(10)
.build(),
SWITCH_ON = create("switch_on")
.subtitle("Switch closing")
.category(SoundSource.BLOCKS)
.attenuationDistance(10)
.build(),
SWITCH_OFF = create("switch_off")
.subtitle("Switch opening")
.category(SoundSource.BLOCKS)
.attenuationDistance(10)
.build();
private static SoundEntryBuilder create(String name) {
return create(TFMG.asResource(name));
@@ -433,4 +456,4 @@ public class TFMGSoundEvents {
}
}
}

View File

@@ -147,6 +147,9 @@
"tfmg.keyinfo.transmission_shift_down": "Transmission Shift Down",
"create.multimeter.header": "Multimeter Data:",
"create.multimeter.network_power_consumption": "Network power consumption: ",
"create.multimeter.network_power_generation": "Network power generation: ",
"create.multimeter.not_enough_power": "NOT ENOUGH POWER!",
"create.multimeter.additional_values": "Additional Values:",
"create.multimeter.power_usage": " Power Usage: ",
"create.multimeter.group": " Group: ",
@@ -170,8 +173,11 @@
"tfmg.subtitle.engine_sounds": "Engine Sounds",
"tfmg.subtitle.diesel_engine_sounds": "Diesel Engine Sounds"
"tfmg.subtitle.engine_sounds": "Engine sounds",
"tfmg.subtitle.diesel_engine_sounds": "Diesel Engine sounds",
"tfmg.subtitle.electric_hum": "Electric hum",
"tfmg.subtitle.generator_hum": "Generator hum",
"tfmg.subtitle.switch_on": "Switch closing",
"tfmg.subtitle.switch_off": "Switch opening"
}

View File

@@ -253,8 +253,8 @@
"item.tfmg.quad_potato_cannon.tooltip.condition1": "When R-Clicked",
"item.tfmg.quad_potato_cannon.tooltip.behaviour1": "_Shoots_ a suitable item from your _Inventory_.",
"item.tfmg.quad_potato_cannon.tooltip.condition2": "While wearing Backtank",
"item.tfmg.quad_potato_cannon.tooltip.behaviour2": "_No_ _Durability_ will be used. Instead, _Air_ _pressure_ is drained from the Tank"
"item.tfmg.quad_potato_cannon.tooltip.behaviour2": "_No_ _Durability_ will be used. Instead, _Air_ _pressure_ is drained from the Tank",
"item.tfmg.fire_extinguisher.tooltip.summary": "Uses _Carbon Dioxide_ to extinguish fires.",
"block.tfmg.gas_lamp.tooltip.summary": "Burns combustible fluids to provide light."
}

View File

@@ -204,6 +204,8 @@
"block.tfmg.fossilstone": "Окаменелость",
"block.tfmg.galena": "Галенит",
"block.tfmg.galena_pillar": "Галенитовая колонна",
"block.tfmg.gas_lamp": "Газовый фонарь",
"block.tfmg.gas_lamp.tooltip.summary": "Источник освещения. Потребляет _горючие жидкости и газы_.",
"block.tfmg.gasoline": "Бензин",
"block.tfmg.generator": "Генератор",
"block.tfmg.glass_aluminum_pipe": "Застеклённая алюминиевая жидкостная труба",
@@ -425,7 +427,6 @@
"block.tfmg.red_rebar_concrete_stairs": "Красные железобетонные ступеньки",
"block.tfmg.red_rebar_concrete_wall": "Красная железобетонная ограда",
"block.tfmg.regular_engine": "Стандартный двигатель",
"block.tfmg.reinforced_fireproof_bricks": "Укреплённые огнеупорные кирпичи",
"block.tfmg.resistor": "Резистор",
"block.tfmg.resistor.tooltip.behaviour1": "Добавляет сопротивление (величину можно изменить на намоточном станке) в электрическую группу подключённого блока.",
"block.tfmg.resistor.tooltip.condition1": "При установке на блок в составе группы",
@@ -605,12 +606,15 @@
"create.multimeter.energy_usage": " Потребление энергии: ",
"create.multimeter.group": " Группа: ",
"create.multimeter.header": "Данные измерений:",
"create.multimeter.power_generated": " Генерация энергии: ",
"create.multimeter.not_enough_power": "НЕДОСТАТОЧНАЯ МОЩНОСТЬ",
"create.multimeter.power_generated": " Генерируемая мощность: ",
"create.multimeter.power_percentage": " Резерв мощности сети: ",
"create.multimeter.power_usage": " Потребление мощности: ",
"create.multimeter.transformer_ratio": " Коэффициент трансформации: ",
"create.multimeter.voltage_generated": " Генерируемое напряжение: ",
"create.network": "Сеть: %1$s",
"create.multimeter.network_power_consumption": "Потребление мощности в сети: ",
"create.multimeter.network_power_generation": "Генерация мощности в сети: ",
"create.oil_hammer.reserves": "Резервы нефти: %1$s",
"create.pumpjack_deposit_amount": "%1$s вёдер",
"create.recipe.advanced_distillation": "Ректификация",
@@ -644,8 +648,8 @@
"distillation_output.mode.keep_fluid": "Останавливать процесс",
"distillation_output.mode.void_when_full": "Уничтожать избытки",
"effect.tfmg.hellfire": "Адское пламя",
"effect.tfmg.hellfire.description": "§kОписание отсутствует§r",
"entity.tfmg.blue_spark": "Синяя искра",
"entity.tfmg.dry_ice_flake": "Крошка сухого льда",
"entity.tfmg.copper_grenade": "Медная граната",
"entity.tfmg.green_spark": "Зелёная искра",
"entity.tfmg.lithium_spark": "Литиевая искра",
@@ -776,6 +780,8 @@
"item.tfmg.ethylene_bucket": "Баллон этилена",
"item.tfmg.fireclay_ball": "Комок огнеупорной глины",
"item.tfmg.fireproof_brick": "Огнеупорный кирпич",
"item.tfmg.fire_extinguisher": "Огнетушитель",
"item.tfmg.fire_extinguisher.tooltip.summary": "Использует углекислый газ для тушения пожаров",
"item.tfmg.flamethrower": "Огнемёт",
"item.tfmg.flamethrower.tooltip.behaviour1": "_Выпускает струю пламени_.",
"item.tfmg.flamethrower.tooltip.behaviour2": "Заправляется _топливом_ из бака. Вид топлива влияет на _дальнобойность_ и _разброс_.",
@@ -980,20 +986,12 @@
"item.tfmg.yellow_multimeter.tooltip.summary": "Отображает данные об электроприборе и сети, к которой он подключён.",
"item.tfmg.zinc_electrode": "Цинковый электрод",
"item.tfmg.zinc_grenade": "Цинковая граната",
"tag.fluid.tfmg.blast_stove_fuel": "Топливо для доменного воздухонагревателя",
"tag.fluid.tfmg.firebox_fuel": "Топливо для топки",
"tag.fluid.tfmg.flammable": "Горючие жидкости",
"tag.fluid.tfmg.gas": "Топливо",
"tag.item.tfmg.blast_furnace_fuel": "Топливо для доменной печи",
"tag.item.tfmg.flux": "Флюс",
"tag.item.tfmg.rods": "Стержни",
"tag.item.tfmg.spools": "Катушки",
"tag.item.tfmg.stone_types.bauxite": "Бокситовые камни",
"tag.item.tfmg.stone_types.galena": "Галенитовые камни",
"tfmg.keyinfo.custom_button": "Настраиваемая кнопка контроллера двигателя",
"tfmg.keyinfo.engine_start": "Запуск двигателя",
"tfmg.keyinfo.transmission_shift_down": "Понижение передачи",
"tfmg.keyinfo.transmission_shift_up": "Повышение передачи",
"tfmg.ponder.arc_furnace.header": "Дуговой печью",
"tfmg.ponder.arc_furnace.text_1": "Три графитовых электрода позволят создать дуговую печь — электрический аналог доменной печи",
"tfmg.ponder.blast_furnace.header": "Доменным процессом",
"tfmg.ponder.blast_furnace.text_1": "Основной блок доменной печи — это её лётка, то есть выход для продуктов плавки",
"tfmg.ponder.blast_furnace.text_2": "Для постройки доменной печи возведите трубу из огнеупорного кирпича, с одним люком доменной печи в стенке",
@@ -1009,7 +1007,7 @@
"tfmg.ponder.chemical_vat.text_4": "Вместо лопастей в промышленный смешиватель можно установить центрифугу",
"tfmg.ponder.chemical_vat.text_5": "Для некоторых процессов требуется нагрев",
"tfmg.ponder.chemical_vat.text_6": "Подключение к реактору двух электродных держателей с медными или цинковыми электродами превратит его в электролизёр",
"tfmg.ponder.chemical_vat.text_7": "3 графитовых электрода позволят создать дуговую печь — электрический аналог доменной печи",
"tfmg.ponder.chemical_vat.text_7": "Три графитовых электрода позволят создать дуговую печь — электрический аналог доменной печи",
"tfmg.ponder.coke_oven.header": "Коксованием",
"tfmg.ponder.coke_oven.text_1": "Коксовая печь производит кокс из каменного угля и древесный уголь из древесины",
"tfmg.ponder.coke_oven.text_2": "Процесс коксования длительный, так что имеет смысл строить целые батареи коксовых печей",
@@ -1042,6 +1040,8 @@
"tfmg.ponder.electricity_two.text_5": "Другой прибор — потенциометр, с его помощью можно задать выходное напряжение в процентах от входного",
"tfmg.ponder.electricity_two.text_6": "Выключатель разрывает передачу электроэнергии при получении редстоун-сигнала",
"tfmg.ponder.electricity_two.text_7": "Трансформатор повышает или понижает напряжение пропорционально соотношению витков первичной и вторичной обмоток",
"tfmg.ponder.electrolysis.header": "Электролизом",
"tfmg.ponder.electrolysis.text_1": "Подключение к реактору двух электродных держателей с медными или цинковыми электродами превратит его в электролизёр",
"tfmg.ponder.engines.header": "Двигателями",
"tfmg.ponder.engines.text_1": "Для постройки двигателя разместите до 5 блоков двигателя в ряд",
"tfmg.ponder.engines.text_2": "Подсказки позволят узнать, какие компоненты нужно установить в процессе сборки",
@@ -1052,13 +1052,18 @@
"tfmg.ponder.engines.text_7": "Каждый блок двигателя может быть улучшен установкой на него разных предметов с помощью ПКМ",
"tfmg.ponder.engines.text_8": "Например, промышленные трубы позволят двигателю самостоятельно забирать топливо из расположенного рядом бака",
"tfmg.ponder.engines.text_9": "Для запуска двигателя подайте редстоун-сигнал",
"tfmg.ponder.industrial_mixer.header": "Промышленным смешивателем",
"tfmg.ponder.industrial_mixer.text_1": "Промышленный смешиватель — механический компонент для химического реактора",
"tfmg.ponder.industrial_mixer.text_2": "При установке в него лопастей реактор начнёт работать как смешиватель",
"tfmg.ponder.industrial_mixer.text_3": "Вместо лопастей можно установить центрифугу",
"tfmg.ponder.pumpjack.header": "Добычей нефти",
"tfmg.ponder.pumpjack.text_1": "Чтобы начать добычу нефти, постройте колонну промышленных труб от месторождения до места размещения насоса",
"tfmg.ponder.pumpjack.text_2": "Разместите оголовок скважины на колонне труб — он будет основой нефтяной скважины",
"tfmg.ponder.pumpjack.text_3": "Разместите за ним стойку насоса-качалки",
"tfmg.ponder.pumpjack.text_4": "Далее разместите над оголовком скважины головку балансира, а с противоположной стороны — шарнир балансира",
"tfmg.ponder.pumpjack.text_5": "Соедините головку и шарнир, построив сам балансир из сегментов",
"tfmg.ponder.pumpjack.text_6": "Наконец, разместите снизу от шарнира балансира машинный ввод (к которому будет подведено вращение для работы), а на него — кривошип насоса. Склейте балансир суперклеем, и насос будет собран",
"tfmg.ponder.pumpjack.text_6": "Не забудьте склеить балансир суперклеем",
"tfmg.ponder.pumpjack.text_7": "Наконец, разместите снизу от шарнира балансира машинный ввод (к которому будет подведено вращение для работы), а на него — кривошип насоса",
"tfmg.ponder.shared.behaviour_modify_value_panel": "Поведение можно изменить с помощью меню выбора значений",
"tfmg.ponder.shared.movement_anchors": "С помощью суперклея можно перемещать крупные структуры.",
"tfmg.ponder.shared.rpm16": "16 об/мин",
@@ -1077,5 +1082,9 @@
"tfmg.ponder.tag.oil_processing": "Нефтепереработкой",
"tfmg.ponder.tag.oil_processing.description": "Блоки, применяемые для добычи и переработки нефти",
"tfmg.subtitle.diesel_engine_sounds": "Шум дизельного двигателя",
"tfmg.subtitle.engine_sounds": "Шум двигателя"
"tfmg.subtitle.electric_hum": "Электрический гул",
"tfmg.subtitle.engine_sounds": "Шум двигателя",
"tfmg.subtitle.generator_hum": "Гул генератора",
"tfmg.subtitle.switch_off": "Выключатель разомкнут",
"tfmg.subtitle.switch_on": "Выключатель замкнут"
}

View File

@@ -0,0 +1,204 @@
{
"format_version": "1.21.6",
"credit": "Made with Blockbench",
"parent": "minecraft:block/block",
"textures": {
"0": "tfmg:block/gas_lamp",
"particle": "block/anvil"
},
"elements": [
{
"name": "base",
"from": [4, 0, 4],
"to": [12, 5, 12],
"faces": {
"north": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"east": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"south": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"west": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"up": {"uv": [0, 6, 2, 8], "texture": "#0"},
"down": {"uv": [0, 4, 2, 6], "texture": "#0"}
}
},
{
"name": "baseplate",
"from": [1.25, 2, 1.25],
"to": [14.75, 4, 14.75],
"rotation": {"angle": 0, "axis": "y", "origin": [12, 2, 2]},
"faces": {
"north": {"uv": [0.5, 8.25, 3.5, 8.75], "texture": "#0"},
"east": {"uv": [0.5, 8.25, 3.5, 8.75], "texture": "#0"},
"south": {"uv": [0.5, 8.25, 3.5, 8.75], "texture": "#0"},
"west": {"uv": [0.25, 8.25, 3.75, 8.75], "texture": "#0"},
"up": {"uv": [0.25, 8.75, 3.75, 12.25], "texture": "#0"},
"down": {"uv": [0.25, 8.75, 3.75, 12.25], "texture": "#0"}
}
},
{
"name": "nozzle",
"from": [6, 5, 6],
"to": [10, 6, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [0, -9, 0]},
"faces": {
"north": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"east": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"south": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"west": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"up": {"uv": [0, 1.5, 1, 2.5], "texture": "#0"}
}
},
{
"name": "glass_lower_n",
"from": [1, 3, 1],
"to": [15, 12, 1],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 1, 2]},
"faces": {
"north": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"south": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"down": {"uv": [5, 4.5, 8.5, 8], "texture": "#0"}
}
},
{
"name": "glass_lower_e",
"from": [15, 3, 1],
"to": [15, 12, 15],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 1, 2]},
"faces": {
"east": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"west": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"down": {"uv": [5, 4.5, 8.5, 8], "texture": "#0"}
}
},
{
"name": "glass_lower_s",
"from": [1, 3, 15],
"to": [15, 12, 15],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 1, 2]},
"faces": {
"north": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"south": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"down": {"uv": [5, 4.5, 8.5, 8], "texture": "#0"}
}
},
{
"name": "glass_lower_w",
"from": [1, 3, 1],
"to": [1, 12, 15],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 1, 2]},
"faces": {
"east": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"west": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"down": {"uv": [5, 4.5, 8.5, 8], "texture": "#0"}
}
},
{
"name": "glass_joiner_corners",
"from": [0, 12, 0],
"to": [16, 12, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 12, 0]},
"faces": {
"up": {"uv": [8.5, 4, 12.5, 8], "texture": "#0"},
"down": {"uv": [8.5, 4, 12.5, 8], "texture": "#0"}
}
},
{
"name": "glass_upper_n",
"from": [0, 12, 0],
"to": [16, 21, 0],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 10, 2]},
"faces": {
"north": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"south": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"}
}
},
{
"name": "glass_upper_e",
"from": [16, 12, 0],
"to": [16, 21, 16],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 10, 18]},
"faces": {
"east": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"west": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"}
}
},
{
"name": "glass_upper_s",
"from": [0, 12, 16],
"to": [16, 21, 16],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 10, 18]},
"faces": {
"north": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"south": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"}
}
},
{
"name": "glass_upper_w",
"from": [0, 12, 0],
"to": [0, 21, 16],
"rotation": {"angle": 0, "axis": "z", "origin": [-14, 10, 18]},
"faces": {
"east": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"west": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"}
}
},
{
"name": "top",
"from": [0, 21, 0],
"to": [16, 22, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 21, 0]},
"faces": {
"north": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"east": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"south": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"west": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"up": {"uv": [0, 8.5, 4, 12.5], "texture": "#0"},
"down": {"uv": [0, 8.5, 4, 12.5], "texture": "#0"}
}
},
{
"name": "top_cap",
"from": [4, 22, 4],
"to": [12, 24, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 22, 0]},
"faces": {
"north": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"east": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"south": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"west": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"up": {"uv": [1, 9.5, 3, 11.5], "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [0, 30, 0],
"translation": [0, 2, 0],
"scale": [0.4, 0.4, 0.4]
},
"thirdperson_lefthand": {
"rotation": [0, 30, 0],
"translation": [0, 2, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_righthand": {
"rotation": [0, 15, 15],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 15, 15],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1, 0],
"scale": [0.5, 0.5, 0.5]
},
"gui": {
"rotation": [30, 30, 0],
"translation": [0, -2.5, 0],
"scale": [0.5, 0.5, 0.5]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
}

View File

@@ -0,0 +1,235 @@
{
"format_version": "1.21.6",
"credit": "Made with Blockbench",
"parent": "minecraft:block/block",
"textures": {
"0": "tfmg:block/gas_lamp",
"3": "block/campfire_fire",
"particle": "block/anvil"
},
"elements": [
{
"name": "base",
"from": [4, 0, 4],
"to": [12, 5, 12],
"faces": {
"north": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"east": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"south": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"west": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"up": {"uv": [0, 6, 2, 8], "texture": "#0"},
"down": {"uv": [0, 4, 2, 6], "texture": "#0"}
}
},
{
"name": "baseplate",
"from": [1.25, 2, 1.25],
"to": [14.75, 4, 14.75],
"rotation": {"angle": 0, "axis": "y", "origin": [12, 2, 2]},
"faces": {
"north": {"uv": [0.5, 8.25, 3.5, 8.75], "texture": "#0"},
"east": {"uv": [0.5, 8.25, 3.5, 8.75], "texture": "#0"},
"south": {"uv": [0.5, 8.25, 3.5, 8.75], "texture": "#0"},
"west": {"uv": [0.25, 8.25, 3.75, 8.75], "texture": "#0"},
"up": {"uv": [0.25, 8.75, 3.75, 12.25], "texture": "#0"},
"down": {"uv": [0.25, 8.75, 3.75, 12.25], "texture": "#0"}
}
},
{
"name": "nozzle",
"from": [6, 5, 6],
"to": [10, 6, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [0, -9, 0]},
"faces": {
"north": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"east": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"south": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"west": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"up": {"uv": [0, 1.5, 1, 2.5], "texture": "#0"}
}
},
{
"name": "glass_lower_n",
"from": [1, 3, 1],
"to": [15, 12, 1],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 1, 2]},
"faces": {
"north": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"south": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"down": {"uv": [5, 4.5, 8.5, 8], "texture": "#0"}
}
},
{
"name": "glass_lower_e",
"from": [15, 3, 1],
"to": [15, 12, 15],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 1, 2]},
"faces": {
"east": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"west": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"down": {"uv": [5, 4.5, 8.5, 8], "texture": "#0"}
}
},
{
"name": "glass_lower_s",
"from": [1, 3, 15],
"to": [15, 12, 15],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 1, 2]},
"faces": {
"north": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"south": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"down": {"uv": [5, 4.5, 8.5, 8], "texture": "#0"}
}
},
{
"name": "glass_lower_w",
"from": [1, 3, 1],
"to": [1, 12, 15],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 1, 2]},
"faces": {
"east": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"west": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"down": {"uv": [5, 4.5, 8.5, 8], "texture": "#0"}
}
},
{
"name": "glass_joiner_corners",
"from": [0, 12, 0],
"to": [16, 12, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 12, 0]},
"faces": {
"up": {"uv": [8.5, 4, 12.5, 8], "texture": "#0"},
"down": {"uv": [8.5, 4, 12.5, 8], "texture": "#0"}
}
},
{
"name": "glass_upper_n",
"from": [0, 12, 0],
"to": [16, 21, 0],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 10, 2]},
"faces": {
"north": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"south": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"}
}
},
{
"name": "glass_upper_e",
"from": [16, 12, 0],
"to": [16, 21, 16],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 10, 18]},
"faces": {
"east": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"west": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"}
}
},
{
"name": "glass_upper_s",
"from": [0, 12, 16],
"to": [16, 21, 16],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 10, 18]},
"faces": {
"north": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"south": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"}
}
},
{
"name": "glass_upper_w",
"from": [0, 12, 0],
"to": [0, 21, 16],
"rotation": {"angle": 0, "axis": "z", "origin": [-14, 10, 18]},
"faces": {
"east": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"west": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"}
}
},
{
"name": "top",
"from": [0, 21, 0],
"to": [16, 22, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 21, 0]},
"faces": {
"north": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"east": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"south": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"west": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"up": {"uv": [0, 8.5, 4, 12.5], "texture": "#0"},
"down": {"uv": [0, 8.5, 4, 12.5], "texture": "#0"}
}
},
{
"name": "top_cap",
"from": [4, 22, 4],
"to": [12, 24, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 22, 0]},
"faces": {
"north": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"east": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"south": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"west": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"up": {"uv": [1, 9.5, 3, 11.5], "texture": "#0"}
}
},
{
"name": "fire_1",
"from": [8, 5, 2.8],
"to": [8, 21, 13.2],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [8, -6, 8], "rescale": true},
"faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#3"},
"east": {"uv": [0, 0, 16, 16], "texture": "#3"},
"south": {"uv": [0, 0, 0, 0], "texture": "#3"},
"west": {"uv": [0, 0, 16, 16], "texture": "#3"},
"up": {"uv": [0, 0, 0, 0], "texture": "#3"},
"down": {"uv": [0, 0, 0, 0], "texture": "#3"}
}
},
{
"name": "fire_2",
"from": [2.8, 5, 8],
"to": [13.2, 21, 8],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [8, -6, 8], "rescale": true},
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#3"},
"east": {"uv": [0, 0, 0, 0], "texture": "#3"},
"south": {"uv": [0, 0, 16, 16], "texture": "#3"},
"west": {"uv": [0, 0, 0, 0], "texture": "#3"},
"up": {"uv": [0, 0, 0, 0], "texture": "#3"},
"down": {"uv": [0, 0, 0, 0], "texture": "#3"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [0, 30, 0],
"translation": [0, 2, 0],
"scale": [0.4, 0.4, 0.4]
},
"thirdperson_lefthand": {
"rotation": [0, 30, 0],
"translation": [0, 2, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_righthand": {
"rotation": [0, 15, 15],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 15, 15],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1, 0],
"scale": [0.5, 0.5, 0.5]
},
"gui": {
"rotation": [30, 30, 0],
"translation": [0, -2.5, 0],
"scale": [0.5, 0.5, 0.5]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
}

View File

@@ -0,0 +1,136 @@
{
"format_version": "1.21.6",
"credit": "Made with Blockbench",
"parent": "minecraft:block/block",
"textures": {
"0": "tfmg:block/gas_lamp",
"3": "block/campfire_fire",
"particle": "block/anvil"
},
"elements": [
{
"name": "base",
"from": [4, 0, 4],
"to": [12, 5, 12],
"faces": {
"north": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"east": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"south": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"west": {"uv": [0, 2.75, 2, 4], "texture": "#0"},
"up": {"uv": [0, 6, 2, 8], "texture": "#0"},
"down": {"uv": [0, 4, 2, 6], "texture": "#0"}
}
},
{
"name": "baseplate",
"from": [2, 2, 2],
"to": [14, 4, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [12, 2, 2]},
"faces": {
"north": {"uv": [2, 4, 5, 5], "texture": "#0"},
"east": {"uv": [2, 4, 5, 5], "texture": "#0"},
"south": {"uv": [2, 4, 5, 5], "texture": "#0"},
"west": {"uv": [2, 4, 5, 5], "texture": "#0"},
"up": {"uv": [2, 5, 5, 8], "texture": "#0"},
"down": {"uv": [2, 5, 5, 8], "texture": "#0"}
}
},
{
"name": "nozzle",
"from": [6, 5, 6],
"to": [10, 6, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [0, -9, 0]},
"faces": {
"north": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"east": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"south": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"west": {"uv": [0, 2.5, 1, 2.75], "texture": "#0"},
"up": {"uv": [0, 1.5, 1, 2.5], "texture": "#0"}
}
},
{
"name": "glass_lower",
"from": [1, 3, 1],
"to": [15, 12, 15],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 1, 2]},
"faces": {
"north": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"east": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"south": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"west": {"uv": [5, 2.25, 8.5, 4.5], "texture": "#0"},
"down": {"uv": [5, 4.5, 8.5, 8], "texture": "#0"}
}
},
{
"name": "glass_upper",
"from": [0, 12, 0],
"to": [16, 21, 16],
"rotation": {"angle": 0, "axis": "z", "origin": [2, 10, 2]},
"faces": {
"north": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"east": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"south": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"west": {"uv": [8.5, 1.75, 12.5, 4], "texture": "#0"},
"down": {"uv": [8.5, 4, 12.5, 8], "texture": "#0"}
}
},
{
"name": "top",
"from": [0, 21, 0],
"to": [16, 22, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 21, 0]},
"faces": {
"north": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"east": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"south": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"west": {"uv": [0, 8.25, 4, 8.5], "texture": "#0"},
"up": {"uv": [0, 8.5, 4, 12.5], "texture": "#0"}
}
},
{
"name": "top_cap",
"from": [4, 22, 4],
"to": [12, 24, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 22, 0]},
"faces": {
"north": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"east": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"south": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"west": {"uv": [1, 9, 3, 9.5], "texture": "#0"},
"up": {"uv": [1, 9.5, 3, 11.5], "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [0, 30, 0],
"translation": [0, 2, 0],
"scale": [0.4, 0.4, 0.4]
},
"thirdperson_lefthand": {
"rotation": [0, 30, 0],
"translation": [0, 2, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_righthand": {
"rotation": [0, 15, 15],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 15, 15],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1, 0],
"scale": [0.5, 0.5, 0.5]
},
"gui": {
"rotation": [30, 30, 0],
"translation": [0, -2.5, 0],
"scale": [0.5, 0.5, 0.5]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
}

View File

@@ -0,0 +1,115 @@
{
"format_version": "1.9.0",
"credit": "Made with Blockbench",
"texture_size": [32, 32],
"textures": {
"1": "tfmg:item/fire_extinguisher"
},
"elements": [
{
"name": "tank_bottom",
"from": [5.5, 0, 5.5],
"to": [10.5, 10, 10.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 5, 8]},
"faces": {
"north": {"uv": [0, 0, 2.5, 5], "texture": "#1"},
"east": {"uv": [2.5, 0, 5, 5], "texture": "#1"},
"south": {"uv": [0, 5, 2.5, 10], "texture": "#1"},
"west": {"uv": [5, 0, 7.5, 5], "texture": "#1"},
"up": {"uv": [5, 7.5, 2.5, 5], "texture": "#1"},
"down": {"uv": [7.5, 5, 5, 7.5], "texture": "#1"}
}
},
{
"name": "tank_top",
"from": [6, 10, 6],
"to": [10, 11, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10.5, 8]},
"faces": {
"north": {"uv": [7.5, 0, 9.5, 0.5], "texture": "#1"},
"east": {"uv": [7.5, 0.5, 9.5, 1], "texture": "#1"},
"south": {"uv": [7.5, 1, 9.5, 1.5], "texture": "#1"},
"west": {"uv": [7.5, 1.5, 9.5, 2], "texture": "#1"},
"up": {"uv": [7.5, 2, 9.5, 4], "texture": "#1"}
}
},
{
"name": "head",
"from": [6.5, 11, 6.5],
"to": [9.5, 14, 9.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 12.5, 8]},
"faces": {
"north": {"uv": [9.5, 0, 11, 1.5], "texture": "#1"},
"east": {"uv": [9.5, 1.5, 11, 3], "texture": "#1"},
"south": {"uv": [9.5, 3, 11, 4.5], "texture": "#1"},
"west": {"uv": [9.5, 4.5, 11, 6], "texture": "#1"},
"up": {"uv": [9.5, 6, 11, 7.5], "texture": "#1"},
"down": {"uv": [9.5, 7.5, 11, 9], "texture": "#1"}
}
},
{
"name": "lever_upper",
"from": [7.5, 13, 9],
"to": [8.5, 14, 13],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 13.5, 9]},
"faces": {
"east": {"uv": [4, 7.5, 6, 8], "texture": "#1"},
"south": {"uv": [3.5, 8, 4, 8.5], "texture": "#1"},
"west": {"uv": [4, 8, 6, 8.5], "texture": "#1"},
"up": {"uv": [2.5, 7.5, 3, 9.5], "texture": "#1"},
"down": {"uv": [3, 7.5, 3.5, 9.5], "texture": "#1"}
}
},
{
"name": "lever_lower",
"from": [7.5, 12, 9],
"to": [8.5, 13, 13],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 9]},
"faces": {
"east": {"uv": [4, 7.5, 6, 8], "texture": "#1"},
"south": {"uv": [3.5, 8, 4, 8.5], "texture": "#1"},
"west": {"uv": [4, 8, 6, 8.5], "texture": "#1"},
"up": {"uv": [2.5, 7.5, 3, 9.5], "texture": "#1"},
"down": {"uv": [3, 7.5, 3.5, 9.5], "texture": "#1"}
}
},
{
"name": "tube",
"from": [7.5, 12, 5.5],
"to": [8.5, 13, 6.5],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 6]},
"faces": {
"east": {"uv": [4, 8.5, 4.5, 9], "texture": "#1"},
"west": {"uv": [4.5, 8.5, 5, 9], "texture": "#1"},
"up": {"uv": [3.5, 8.5, 4, 9], "texture": "#1"},
"down": {"uv": [3.5, 9, 4, 9.5], "texture": "#1"}
}
},
{
"name": "nozzle",
"from": [7, 11.5, 3.5],
"to": [9, 13.5, 5.5],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 12.5, 4.5]},
"faces": {
"north": {"uv": [7.5, 4, 8.5, 5], "texture": "#1"},
"east": {"uv": [7.5, 5, 8.5, 6], "texture": "#1"},
"south": {"uv": [7.5, 6, 8.5, 7], "texture": "#1"},
"west": {"uv": [7.5, 7, 8.5, 8], "texture": "#1"},
"up": {"uv": [8.5, 4, 9.5, 5], "texture": "#1"},
"down": {"uv": [8.5, 5, 9.5, 6], "texture": "#1"}
}
}
],
"display": {
"ground": {
"translation": [0, 4, 0]
},
"gui": {
"rotation": [-30, 130, 30],
"translation": [0, 1, 0]
},
"fixed": {
"rotation": [0, 90, 0]
}
}
}

View File

@@ -19,5 +19,45 @@
}
],
"subtitle": "tfmg.subtitle.diesel_engine_sounds"
},
"electric_hum": {
"sounds": [
{
"name": "tfmg:electric_hum",
"type": "file",
"attenuation_distance": 16
}
],
"subtitle": "tfmg.subtitle.electric_hum"
},
"generator_hum": {
"sounds": [
{
"name": "tfmg:generator_hum",
"type": "file",
"attenuation_distance": 16
}
],
"subtitle": "tfmg.subtitle.generator_hum"
},
"switch_on": {
"sounds": [
{
"name": "tfmg:switch_on",
"type": "file",
"attenuation_distance": 16
}
],
"subtitle": "tfmg.subtitle.switch_on"
},
"switch_off": {
"sounds": [
{
"name": "tfmg:switch_off",
"type": "file",
"attenuation_distance": 16
}
],
"subtitle": "tfmg.subtitle.switch_off"
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B