diff --git a/gradle.properties b/gradle.properties index 2992f2a6..04fc0e6f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,7 +33,7 @@ registrate_version = MC1.21-1.3.0+62 mod_id=tfmg mod_name=Create: The Factory Must Grow mod_license=MIT -mod_version=1.1.1 +mod_version=1.2.0 mod_group_id=com.drmangotea mod_authors= DrMangoTea, Pepa, Luna mod_description= Create: The Factory Must Grow brings the age of steel, oil and electricity to the Create mod diff --git a/src/generated/resources/assets/tfmg/blockstates/laminated_magnetic_alloy_block.json b/src/generated/resources/assets/tfmg/blockstates/laminated_magnetic_alloy_block.json new file mode 100644 index 00000000..e86189af --- /dev/null +++ b/src/generated/resources/assets/tfmg/blockstates/laminated_magnetic_alloy_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "tfmg:block/laminated_magnetic_alloy_block" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/tfmg/blockstates/large_coil.json b/src/generated/resources/assets/tfmg/blockstates/large_coil.json new file mode 100644 index 00000000..72d1e3eb --- /dev/null +++ b/src/generated/resources/assets/tfmg/blockstates/large_coil.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "tfmg:block/large_coil/block" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/tfmg/blockstates/large_switch.json b/src/generated/resources/assets/tfmg/blockstates/large_switch.json new file mode 100644 index 00000000..84b05ff8 --- /dev/null +++ b/src/generated/resources/assets/tfmg/blockstates/large_switch.json @@ -0,0 +1,34 @@ +{ + "variants": { + "facing=east,is_main_part=false": { + "model": "tfmg:block/large_switch/block_secondary", + "y": 270 + }, + "facing=east,is_main_part=true": { + "model": "tfmg:block/large_switch/block_primary", + "y": 270 + }, + "facing=north,is_main_part=false": { + "model": "tfmg:block/large_switch/block_secondary", + "y": 180 + }, + "facing=north,is_main_part=true": { + "model": "tfmg:block/large_switch/block_primary", + "y": 180 + }, + "facing=south,is_main_part=false": { + "model": "tfmg:block/large_switch/block_secondary" + }, + "facing=south,is_main_part=true": { + "model": "tfmg:block/large_switch/block_primary" + }, + "facing=west,is_main_part=false": { + "model": "tfmg:block/large_switch/block_secondary", + "y": 90 + }, + "facing=west,is_main_part=true": { + "model": "tfmg:block/large_switch/block_primary", + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/tfmg/blockstates/large_transformer.json b/src/generated/resources/assets/tfmg/blockstates/large_transformer.json new file mode 100644 index 00000000..2a5c5f4f --- /dev/null +++ b/src/generated/resources/assets/tfmg/blockstates/large_transformer.json @@ -0,0 +1,64 @@ +{ + "variants": { + "facing=east,is_main_part=false,unfinished_model=false": { + "model": "tfmg:block/large_transformer/block", + "y": 90 + }, + "facing=east,is_main_part=false,unfinished_model=true": { + "model": "tfmg:block/large_transformer/block_unfinished", + "y": 90 + }, + "facing=east,is_main_part=true,unfinished_model=false": { + "model": "tfmg:block/large_transformer/block", + "y": 270 + }, + "facing=east,is_main_part=true,unfinished_model=true": { + "model": "tfmg:block/large_transformer/block_unfinished", + "y": 270 + }, + "facing=north,is_main_part=false,unfinished_model=false": { + "model": "tfmg:block/large_transformer/block" + }, + "facing=north,is_main_part=false,unfinished_model=true": { + "model": "tfmg:block/large_transformer/block_unfinished" + }, + "facing=north,is_main_part=true,unfinished_model=false": { + "model": "tfmg:block/large_transformer/block", + "y": 180 + }, + "facing=north,is_main_part=true,unfinished_model=true": { + "model": "tfmg:block/large_transformer/block_unfinished", + "y": 180 + }, + "facing=south,is_main_part=false,unfinished_model=false": { + "model": "tfmg:block/large_transformer/block", + "y": 180 + }, + "facing=south,is_main_part=false,unfinished_model=true": { + "model": "tfmg:block/large_transformer/block_unfinished", + "y": 180 + }, + "facing=south,is_main_part=true,unfinished_model=false": { + "model": "tfmg:block/large_transformer/block" + }, + "facing=south,is_main_part=true,unfinished_model=true": { + "model": "tfmg:block/large_transformer/block_unfinished" + }, + "facing=west,is_main_part=false,unfinished_model=false": { + "model": "tfmg:block/large_transformer/block", + "y": 270 + }, + "facing=west,is_main_part=false,unfinished_model=true": { + "model": "tfmg:block/large_transformer/block_unfinished", + "y": 270 + }, + "facing=west,is_main_part=true,unfinished_model=false": { + "model": "tfmg:block/large_transformer/block", + "y": 90 + }, + "facing=west,is_main_part=true,unfinished_model=true": { + "model": "tfmg:block/large_transformer/block_unfinished", + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/tfmg/lang/en_ud.json b/src/generated/resources/assets/tfmg/lang/en_ud.json index 2422c0ba..d2d013ef 100644 --- a/src/generated/resources/assets/tfmg/lang/en_ud.json +++ b/src/generated/resources/assets/tfmg/lang/en_ud.json @@ -246,7 +246,12 @@ "block.tfmg.industrial_mixer": "ɹǝxıW ןɐıɹʇsnpuI", "block.tfmg.industrial_pipe": "ǝdıԀ ןɐıɹʇsnpuI", "block.tfmg.kerosene": "ǝuǝsoɹǝʞ", + "block.tfmg.laminated_magnetic_alloy_block": "ʞɔoןᗺ ʎoןןⱯ ɔıʇǝubɐW pǝʇɐuıɯɐꞀ", "block.tfmg.large_aluminum_cogwheel": "ןǝǝɥʍboƆ ɯnuıɯnןⱯ ǝbɹɐꞀ", + "block.tfmg.large_coil": "ןıoƆ ǝbɹɐꞀ", + "block.tfmg.large_coil.tooltip.behaviour1": "ʇǝʞɔnᗺ ןıO uoıʇɐɔıɹqnꞀ ɐ puɐ ןǝǝʇS ɟo ʞɔoןᗺ ɐ ɥʇıʍ ʇı ʞɔıןɔ-ʇɥbıɹ 'ʇuǝıɔıɟɟǝ ʇı ǝʞɐɯ oʇ 'pǝʇɐǝɹƆ sı ɹǝɯɹoɟsuɐɹ⟘ ǝbɹɐꞀ ǝɥ⟘", + "block.tfmg.large_coil.tooltip.condition1": "ʞɔoןᗺ ʎoןןⱯ ɔıʇǝubɐW pǝʇɐuıɯɐꞀ ɐ ɥʇıʍ pǝʞɔıןɔ-ʇɥbıɹ puɐ ɹǝɥʇo ɥɔɐǝ oʇ ʇxǝu pǝɔɐןd ǝɹɐ sןıoƆ ǝbɹɐꞀ ᄅ uǝɥM", + "block.tfmg.large_coil.tooltip.summary": "ɹǝɯɹoɟsuɐɹ⟘ ǝbɹɐꞀ ǝɥʇ buıʇɐǝɹɔ ɹoɟ pǝs∩", "block.tfmg.large_engine": "ǝuıbuƎ ǝbɹɐꞀ", "block.tfmg.large_engine.tooltip.behaviour1": ")ǝuıbuǝ ɯɐǝʇs ɐ oʇ ɹɐıןıɯıs pǝɥɔɐʇʇɐ ǝq oʇ spǝǝu ʇɟɐɥs ɐ( uoıʇɐʇoɹ ǝʇɐɹǝuǝb oʇ )ʇsnɐɥxǝ uɐ spǝǝu( ʇno pǝdɯnd ǝq oʇ ᄅoɔ puɐ )sɐ⅁ ǝɔɐuɹnℲ 'ɐʇɥdɐN 'ǝuǝsoɹǝʞ 'ןǝsǝıᗡ( uı pǝdɯnd ǝq oʇ ןǝnɟ puɐ ɹıɐ sǝɹınbǝɹ ʇı uoıʇɔunɟ o⟘", "block.tfmg.large_engine.tooltip.summary": "sןǝnɟ pǝuıɟǝɹ ssǝן ɯoɹɟ uoıʇɐʇoɹ sǝʇɐǝɹƆ", @@ -254,6 +259,8 @@ "block.tfmg.large_pumpjack_hammer_head": "pɐǝH ɹǝɯɯɐH ʞɔɐظdɯnԀ ǝbɹɐꞀ", "block.tfmg.large_pumpjack_hammer_part": "ʇɹɐԀ ɹǝɯɯɐH ʞɔɐظdɯnԀ ǝbɹɐꞀ", "block.tfmg.large_steel_cogwheel": "ןǝǝɥʍboƆ ןǝǝʇS ǝbɹɐꞀ", + "block.tfmg.large_switch": "ɥɔʇıʍS ǝbɹɐꞀ", + "block.tfmg.large_transformer": "ɹǝɯɹoɟsuɐɹ⟘ ǝbɹɐꞀ", "block.tfmg.layered_bauxite": "ǝʇıxnɐᗺ pǝɹǝʎɐꞀ", "block.tfmg.layered_galena": "ɐuǝןɐ⅁ pǝɹǝʎɐꞀ", "block.tfmg.lead_bars": "sɹɐᗺ pɐǝꞀ", @@ -740,6 +747,7 @@ "item.tfmg.magnet": "ʇǝubɐW", "item.tfmg.magnetic_alloy_ingot": "ʇobuI ʎoןןⱯ ɔıʇǝubɐW", "item.tfmg.magnetic_alloy_ingot.tooltip.summary": "˙˙˙buıɥʇǝɯos op ʇɥbıɯ buıuʇɥbıן ɐ ɥʇıʍ sıɥʇ buıʞıɹʇS", + "item.tfmg.magnetic_alloy_sheet": "ʇǝǝɥS ʎoןןⱯ ɔıʇǝubɐW", "item.tfmg.mixer_blade": "ǝpɐןᗺ ɹǝxıW", "item.tfmg.molten_plastic_bucket": "ʇǝʞɔnᗺ ɔıʇsɐןԀ uǝʇןoW", "item.tfmg.molten_slag_bucket": "ʇǝʞɔnᗺ bɐןS uǝʇןoW", @@ -990,13 +998,15 @@ "tfmg.goggles.voltmeter.mode.voltage": "ǝbɐʇןoΛ", "tfmg.goggles.voltmeter.range": "%1$s :ǝbuɐᴚ ", "tfmg.goggles.winding_machine.progress": " :ssǝɹboɹԀ", - "tfmg.goggles.winding_machine.turns": "%1$ :ʇɟǝꞀ suɹn⟘", + "tfmg.goggles.winding_machine.turns": " :ʇɟǝꞀ suɹn⟘", "tfmg.goggles.zero": "pıןɐʌuI ǝuıɥɔɐW", "tfmg.keyinfo.custom_button": "uoʇʇnᗺ ɯoʇsnƆ ɹǝןןoɹʇuoƆ ǝuıbuƎ", "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.multimeter.additional_values": ":sǝnןɐΛ ןɐuoıʇıppⱯ", + "tfmg.multimeter.approaching_overcurrent": " ʇuǝɹɹnɔɹǝʌO buıɥɔɐoɹddⱯ ", + "tfmg.multimeter.approaching_overvoltage": " ǝbɐʇןoʌɹǝʌO buıɥɔɐoɹddⱯ ", "tfmg.multimeter.charge": " :ǝbɹɐɥƆ", "tfmg.multimeter.energy_stored": " :pǝɹoʇS ʎbɹǝuƎ ", "tfmg.multimeter.energy_usage": " :ǝbɐs∩ ʎbɹǝuƎ ", @@ -1005,6 +1015,9 @@ "tfmg.multimeter.insufficient_current": ")%s spǝǝN( ʇuǝɹɹnƆ ɥbnouƎ ʇoN", "tfmg.multimeter.insufficient_power": "ɹǝʍoԀ ɥbnouƎ ʇoN", "tfmg.multimeter.insufficient_power.requirement": ")%s spǝǝN( ɹǝʍoԀ ɥbnouƎ ʇoN", + "tfmg.multimeter.large_transformer.air_cooled": "pǝןooƆ ɹıⱯ :ǝʇɐʇS ", + "tfmg.multimeter.large_transformer.metal_cooled": "pǝןooƆ ʞuıS ʇɐǝH ןɐʇǝW :ǝʇɐʇS ", + "tfmg.multimeter.large_transformer.oil_cooled": "pǝןooƆ ʞuıS ʇɐǝH + ןıO :ǝʇɐʇS ", "tfmg.multimeter.network.consumption": "%s :uoıʇdɯnsuoƆ ɹǝʍoԀ ʞɹoʍʇǝN", "tfmg.multimeter.network.generation": "%s :uoıʇɐɹǝuǝ⅁ ɹǝʍoԀ ʞɹoʍʇǝN", "tfmg.multimeter.power_generated": "%s :pǝʇɐɹǝuǝ⅁ ɹǝʍoԀ ", diff --git a/src/generated/resources/assets/tfmg/lang/en_us.json b/src/generated/resources/assets/tfmg/lang/en_us.json index efdea11d..962ddebc 100644 --- a/src/generated/resources/assets/tfmg/lang/en_us.json +++ b/src/generated/resources/assets/tfmg/lang/en_us.json @@ -246,7 +246,12 @@ "block.tfmg.industrial_mixer": "Industrial Mixer", "block.tfmg.industrial_pipe": "Industrial Pipe", "block.tfmg.kerosene": "Kerosene", + "block.tfmg.laminated_magnetic_alloy_block": "Laminated Magnetic Alloy Block", "block.tfmg.large_aluminum_cogwheel": "Large Aluminum Cogwheel", + "block.tfmg.large_coil": "Large Coil", + "block.tfmg.large_coil.tooltip.behaviour1": "The Large Transformer is Created, to make it efficient, right-click it with a Block of Steel and a Lubrication Oil Bucket", + "block.tfmg.large_coil.tooltip.condition1": "When 2 Large Coils are placed next to each other and right-clicked with a Laminated Magnetic Alloy Block", + "block.tfmg.large_coil.tooltip.summary": "Used for creating the Large Transformer", "block.tfmg.large_engine": "Large Engine", "block.tfmg.large_engine.tooltip.behaviour1": "To function it requires air and fuel to be pumped in (Diesel, Kerosene, Naphta, Furnace Gas) and co2 to be pumped out (needs an exhaust) to generate rotation (a shaft needs to be attached similiar to a steam engine)", "block.tfmg.large_engine.tooltip.summary": "Creates rotation from less refined fuels", @@ -254,6 +259,8 @@ "block.tfmg.large_pumpjack_hammer_head": "Large Pumpjack Hammer Head", "block.tfmg.large_pumpjack_hammer_part": "Large Pumpjack Hammer Part", "block.tfmg.large_steel_cogwheel": "Large Steel Cogwheel", + "block.tfmg.large_switch": "Large Switch", + "block.tfmg.large_transformer": "Large Transformer", "block.tfmg.layered_bauxite": "Layered Bauxite", "block.tfmg.layered_galena": "Layered Galena", "block.tfmg.lead_bars": "Lead Bars", @@ -740,6 +747,7 @@ "item.tfmg.magnet": "Magnet", "item.tfmg.magnetic_alloy_ingot": "Magnetic Alloy Ingot", "item.tfmg.magnetic_alloy_ingot.tooltip.summary": "Striking this with a lightning might do something...", + "item.tfmg.magnetic_alloy_sheet": "Magnetic Alloy Sheet", "item.tfmg.mixer_blade": "Mixer Blade", "item.tfmg.molten_plastic_bucket": "Molten Plastic Bucket", "item.tfmg.molten_slag_bucket": "Molten Slag Bucket", @@ -990,13 +998,15 @@ "tfmg.goggles.voltmeter.mode.voltage": "Voltage", "tfmg.goggles.voltmeter.range": " Range: %1$s", "tfmg.goggles.winding_machine.progress": "Progress: ", - "tfmg.goggles.winding_machine.turns": "Turns Left: %1$", + "tfmg.goggles.winding_machine.turns": "Turns Left: ", "tfmg.goggles.zero": "Machine Invalid", "tfmg.keyinfo.custom_button": "Engine Controller Custom Button", "tfmg.keyinfo.engine_start": "Start Engine", "tfmg.keyinfo.transmission_shift_down": "Transmission Shift Down", "tfmg.keyinfo.transmission_shift_up": "Transmission Shift Up", "tfmg.multimeter.additional_values": "Additional Values:", + "tfmg.multimeter.approaching_overcurrent": " Approaching Overcurrent ", + "tfmg.multimeter.approaching_overvoltage": " Approaching Overvoltage ", "tfmg.multimeter.charge": "Charge: ", "tfmg.multimeter.energy_stored": " Energy Stored: ", "tfmg.multimeter.energy_usage": " Energy Usage: ", @@ -1005,6 +1015,9 @@ "tfmg.multimeter.insufficient_current": "Not Enough Current (Needs %s)", "tfmg.multimeter.insufficient_power": "Not Enough Power", "tfmg.multimeter.insufficient_power.requirement": "Not Enough Power (Needs %s)", + "tfmg.multimeter.large_transformer.air_cooled": " State: Air Cooled", + "tfmg.multimeter.large_transformer.metal_cooled": " State: Metal Heat Sink Cooled", + "tfmg.multimeter.large_transformer.oil_cooled": " State: Oil + Heat Sink Cooled", "tfmg.multimeter.network.consumption": "Network Power Consumption: %s", "tfmg.multimeter.network.generation": "Network Power Generation: %s", "tfmg.multimeter.power_generated": " Power Generated: %s", diff --git a/src/generated/resources/assets/tfmg/models/block/laminated_magnetic_alloy_block.json b/src/generated/resources/assets/tfmg/models/block/laminated_magnetic_alloy_block.json new file mode 100644 index 00000000..8a6bc769 --- /dev/null +++ b/src/generated/resources/assets/tfmg/models/block/laminated_magnetic_alloy_block.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "tfmg:block/laminated_magnetic_alloy_block" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/tfmg/models/item/laminated_magnetic_alloy_block.json b/src/generated/resources/assets/tfmg/models/item/laminated_magnetic_alloy_block.json new file mode 100644 index 00000000..fa16c0c6 --- /dev/null +++ b/src/generated/resources/assets/tfmg/models/item/laminated_magnetic_alloy_block.json @@ -0,0 +1,3 @@ +{ + "parent": "tfmg:block/laminated_magnetic_alloy_block" +} \ No newline at end of file diff --git a/src/generated/resources/assets/tfmg/models/item/large_coil.json b/src/generated/resources/assets/tfmg/models/item/large_coil.json new file mode 100644 index 00000000..73740b9b --- /dev/null +++ b/src/generated/resources/assets/tfmg/models/item/large_coil.json @@ -0,0 +1,3 @@ +{ + "parent": "tfmg:block/large_coil/item" +} \ No newline at end of file diff --git a/src/generated/resources/assets/tfmg/models/item/large_switch.json b/src/generated/resources/assets/tfmg/models/item/large_switch.json new file mode 100644 index 00000000..2eb2c1ad --- /dev/null +++ b/src/generated/resources/assets/tfmg/models/item/large_switch.json @@ -0,0 +1,3 @@ +{ + "parent": "tfmg:block/large_switch/item" +} \ No newline at end of file diff --git a/src/generated/resources/assets/tfmg/models/item/magnetic_alloy_sheet.json b/src/generated/resources/assets/tfmg/models/item/magnetic_alloy_sheet.json new file mode 100644 index 00000000..cd6506b0 --- /dev/null +++ b/src/generated/resources/assets/tfmg/models/item/magnetic_alloy_sheet.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "tfmg:item/magnetic_alloy_sheet" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/create/tags/block/non_movable.json b/src/generated/resources/data/create/tags/block/non_movable.json index b01ff787..3a446ee8 100644 --- a/src/generated/resources/data/create/tags/block/non_movable.json +++ b/src/generated/resources/data/create/tags/block/non_movable.json @@ -1,5 +1,7 @@ { "values": [ - "tfmg:oil_deposit" + "tfmg:oil_deposit", + "tfmg:large_switch", + "tfmg:large_transformer" ] } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/block/beacon_base_blocks.json b/src/generated/resources/data/minecraft/tags/block/beacon_base_blocks.json index c2febb4a..c3448e0b 100644 --- a/src/generated/resources/data/minecraft/tags/block/beacon_base_blocks.json +++ b/src/generated/resources/data/minecraft/tags/block/beacon_base_blocks.json @@ -6,6 +6,7 @@ "tfmg:lead_block", "tfmg:constantan_block", "tfmg:nickel_block", - "tfmg:lithium_block" + "tfmg:lithium_block", + "tfmg:laminated_magnetic_alloy_block" ] } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json index 0042224a..f31b4216 100644 --- a/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json @@ -83,6 +83,7 @@ "tfmg:encased_diode", "tfmg:potentiometer", "tfmg:electrical_switch", + "tfmg:large_switch", "tfmg:encased_potentiometer", "tfmg:electric_pump", "tfmg:voltage_observer", @@ -93,7 +94,9 @@ "tfmg:traffic_light", "tfmg:segmented_display", "tfmg:transformer", + "tfmg:large_transformer", "tfmg:converter", + "tfmg:large_coil", "tfmg:brick_smokestack", "tfmg:metal_smokestack", "tfmg:concrete_smokestack", @@ -116,6 +119,7 @@ "tfmg:nickel_block", "tfmg:lithium_block", "tfmg:coal_coke_block", + "tfmg:laminated_magnetic_alloy_block", "tfmg:heavy_casing_door", "tfmg:steel_door", "tfmg:aluminum_door", diff --git a/src/generated/resources/data/minecraft/tags/block/needs_iron_tool.json b/src/generated/resources/data/minecraft/tags/block/needs_iron_tool.json index 00b36497..7ce2a8d0 100644 --- a/src/generated/resources/data/minecraft/tags/block/needs_iron_tool.json +++ b/src/generated/resources/data/minecraft/tags/block/needs_iron_tool.json @@ -10,6 +10,7 @@ "tfmg:constantan_block", "tfmg:nickel_block", "tfmg:lithium_block", + "tfmg:laminated_magnetic_alloy_block", "tfmg:rebar_block", "tfmg:rebar_floor", "tfmg:rebar_wall", diff --git a/src/generated/resources/data/tfmg/advancement/recipes/misc/crafting/materials/laminated_magnetic_alloy_block.json b/src/generated/resources/data/tfmg/advancement/recipes/misc/crafting/materials/laminated_magnetic_alloy_block.json new file mode 100644 index 00000000..15097ccd --- /dev/null +++ b/src/generated/resources/data/tfmg/advancement/recipes/misc/crafting/materials/laminated_magnetic_alloy_block.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "tfmg:magnetic_alloy_ingot" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "tfmg:crafting/materials/laminated_magnetic_alloy_block" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "tfmg:crafting/materials/laminated_magnetic_alloy_block" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/tfmg/advancement/recipes/misc/crafting/materials/large_switch.json b/src/generated/resources/data/tfmg/advancement/recipes/misc/crafting/materials/large_switch.json new file mode 100644 index 00000000..dd1515b3 --- /dev/null +++ b/src/generated/resources/data/tfmg/advancement/recipes/misc/crafting/materials/large_switch.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "tfmg:cable_connector" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "tfmg:crafting/materials/large_switch" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "tfmg:crafting/materials/large_switch" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/tfmg/loot_table/blocks/laminated_magnetic_alloy_block.json b/src/generated/resources/data/tfmg/loot_table/blocks/laminated_magnetic_alloy_block.json new file mode 100644 index 00000000..bcad9e11 --- /dev/null +++ b/src/generated/resources/data/tfmg/loot_table/blocks/laminated_magnetic_alloy_block.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "tfmg:laminated_magnetic_alloy_block" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "tfmg:blocks/laminated_magnetic_alloy_block" +} \ No newline at end of file diff --git a/src/generated/resources/data/tfmg/loot_table/blocks/large_coil.json b/src/generated/resources/data/tfmg/loot_table/blocks/large_coil.json new file mode 100644 index 00000000..5205ced2 --- /dev/null +++ b/src/generated/resources/data/tfmg/loot_table/blocks/large_coil.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "tfmg:large_coil" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "tfmg:blocks/large_coil" +} \ No newline at end of file diff --git a/src/generated/resources/data/tfmg/loot_table/blocks/large_switch.json b/src/generated/resources/data/tfmg/loot_table/blocks/large_switch.json new file mode 100644 index 00000000..258374de --- /dev/null +++ b/src/generated/resources/data/tfmg/loot_table/blocks/large_switch.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "tfmg:large_switch" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "tfmg:blocks/large_switch" +} \ No newline at end of file diff --git a/src/generated/resources/data/tfmg/loot_table/blocks/large_transformer.json b/src/generated/resources/data/tfmg/loot_table/blocks/large_transformer.json new file mode 100644 index 00000000..3f1c87eb --- /dev/null +++ b/src/generated/resources/data/tfmg/loot_table/blocks/large_transformer.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:air" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "tfmg:blocks/large_transformer" +} \ No newline at end of file diff --git a/src/generated/resources/data/tfmg/recipe/crafting/materials/laminated_magnetic_alloy_block.json b/src/generated/resources/data/tfmg/recipe/crafting/materials/laminated_magnetic_alloy_block.json new file mode 100644 index 00000000..45bfd9d6 --- /dev/null +++ b/src/generated/resources/data/tfmg/recipe/crafting/materials/laminated_magnetic_alloy_block.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "C": { + "item": "tfmg:magnetic_alloy_sheet" + } + }, + "pattern": [ + "CCC", + "CCC", + "CCC" + ], + "result": { + "count": 1, + "id": "tfmg:laminated_magnetic_alloy_block" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/tfmg/recipe/crafting/materials/large_switch.json b/src/generated/resources/data/tfmg/recipe/crafting/materials/large_switch.json new file mode 100644 index 00000000..6a2e66d9 --- /dev/null +++ b/src/generated/resources/data/tfmg/recipe/crafting/materials/large_switch.json @@ -0,0 +1,36 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "B": { + "tag": "c:plates/brass" + }, + "I": { + "item": "tfmg:cable_connector" + }, + "M": { + "item": "tfmg:steel_mechanism" + }, + "P": { + "item": "tfmg:electric_post" + }, + "R": { + "item": "tfmg:rebar" + }, + "S": { + "item": "tfmg:steel_cable_hub" + }, + "W": { + "tag": "c:wires/copper" + } + }, + "pattern": [ + "WRB", + "SMP", + "III" + ], + "result": { + "count": 1, + "id": "tfmg:large_switch" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/tfmg/recipe/crafting/materials/transformer.json b/src/generated/resources/data/tfmg/recipe/crafting/materials/transformer.json index 9254e03d..2bf9baa5 100644 --- a/src/generated/resources/data/tfmg/recipe/crafting/materials/transformer.json +++ b/src/generated/resources/data/tfmg/recipe/crafting/materials/transformer.json @@ -6,7 +6,7 @@ "item": "tfmg:steel_casing" }, "M": { - "item": "tfmg:magnetic_alloy_ingot" + "item": "tfmg:magnetic_alloy_sheet" }, "N": { "tag": "c:plates/nickel" diff --git a/src/generated/resources/data/tfmg/recipe/pressing/magnetic_alloy_ingot.json b/src/generated/resources/data/tfmg/recipe/pressing/magnetic_alloy_ingot.json new file mode 100644 index 00000000..618c9a11 --- /dev/null +++ b/src/generated/resources/data/tfmg/recipe/pressing/magnetic_alloy_ingot.json @@ -0,0 +1,13 @@ +{ + "type": "create:pressing", + "ingredients": [ + { + "item": "tfmg:magnetic_alloy_ingot" + } + ], + "results": [ + { + "id": "tfmg:magnetic_alloy_sheet" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/tfmg/recipe/winding/large_coil.json b/src/generated/resources/data/tfmg/recipe/winding/large_coil.json new file mode 100644 index 00000000..01b4ad60 --- /dev/null +++ b/src/generated/resources/data/tfmg/recipe/winding/large_coil.json @@ -0,0 +1,20 @@ +{ + "type": "tfmg:winding", + "ingredients": [ + { + "item": "tfmg:laminated_magnetic_alloy_block" + }, + { + "item": "tfmg:copper_spool" + } + ], + "processing_time": 100, + "results": [ + { + "components": { + "tfmg:coil_turns": 100 + }, + "id": "tfmg:large_coil" + } + ] +} \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/base/TFMGShapes.java b/src/main/java/com/drmangotea/tfmg/base/TFMGShapes.java index 9ee58bb1..97529276 100644 --- a/src/main/java/com/drmangotea/tfmg/base/TFMGShapes.java +++ b/src/main/java/com/drmangotea/tfmg/base/TFMGShapes.java @@ -29,6 +29,15 @@ public class TFMGShapes { TURBINE_ENGINE_FRONT = shape(2, 2, 0, 14, 14, 16) .add(3, 0, 8, 13, 2, 16) .forHorizontal(SOUTH), + LARGE_SWITCH_SECONDARY = shape(5, 1, 0, 11, 7, 16) + .add(5, 7, 8, 11, 14, 16) + .forHorizontal(SOUTH), + LARGE_SWITCH_PRIMARY = shape(0, 0, 0, 16, 13, 16) + .forHorizontal(SOUTH), + LARGE_TRANSFORMER_UNFINISHED = shape(4, 0, 0, 12, 20, 12).add(0, 4, 0, 16, 16, 16) + .forHorizontal(SOUTH), + LARGE_TRANSFORMER = shape(-1, 2, 4, 17, 17, 16).add(2, 0, 5, 14, 19, 16).add(2, 3, 0, 14, 16, 16) + .forHorizontal(SOUTH), TURBINE_ENGINE_MIDDLE = shape(11, 0, 2, 16, 5, 14) .add(1, 1, 0, 15, 15, 16) .add(0, 0, 2, 5, 5, 14) diff --git a/src/main/java/com/drmangotea/tfmg/base/debug/DebugCinderBlockItem.java b/src/main/java/com/drmangotea/tfmg/base/debug/DebugCinderBlockItem.java index 5b4dffb6..55e57b0c 100644 --- a/src/main/java/com/drmangotea/tfmg/base/debug/DebugCinderBlockItem.java +++ b/src/main/java/com/drmangotea/tfmg/base/debug/DebugCinderBlockItem.java @@ -3,6 +3,7 @@ package com.drmangotea.tfmg.base.debug; import com.drmangotea.tfmg.TFMG; import com.drmangotea.tfmg.content.decoration.tanks.steel.SteelTankBlock; import com.drmangotea.tfmg.content.decoration.tanks.steel.SteelTankBlockEntity; +import com.drmangotea.tfmg.content.electricity.base.IElectric; import com.drmangotea.tfmg.content.electricity.generators.large_generator.StatorBlockEntity; import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionResult; @@ -28,8 +29,9 @@ public class DebugCinderBlockItem extends Item { BlockPos pos = context.getClickedPos(); Level level = context.getLevel(); - if (level.getBlockEntity(pos) instanceof StatorBlockEntity be) { - be.updateRotor(); + if (level.getBlockEntity(pos) instanceof IElectric be) { + + be.onPlaced(); } @@ -45,6 +47,6 @@ public class DebugCinderBlockItem extends Item { TFMG.LOGGER.debug(String.valueOf(be.isDistillationTower)); } } - return InteractionResult.PASS; + return InteractionResult.SUCCESS; } } diff --git a/src/main/java/com/drmangotea/tfmg/base/events/TFMGClientEvents.java b/src/main/java/com/drmangotea/tfmg/base/events/TFMGClientEvents.java index 3d32071c..d3f19a3b 100644 --- a/src/main/java/com/drmangotea/tfmg/base/events/TFMGClientEvents.java +++ b/src/main/java/com/drmangotea/tfmg/base/events/TFMGClientEvents.java @@ -4,7 +4,7 @@ import com.drmangotea.tfmg.TFMG; import com.drmangotea.tfmg.TFMGClient; import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorBlockEntity; import com.drmangotea.tfmg.content.electricity.measurement.MultimeterOverlayRenderer; -import com.drmangotea.tfmg.content.electricity.network.transformer.TransformerBlockEntity; +import com.drmangotea.tfmg.content.electricity.network.transformer.small.TransformerBlockEntity; import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerClientHandler; import com.drmangotea.tfmg.content.items.weapons.advanced_potato_cannon.AdvancedPotatoCannonItemRenderer; import com.drmangotea.tfmg.content.items.weapons.quad_potato_cannon.QuadPotatoCannonItemRenderer; diff --git a/src/main/java/com/drmangotea/tfmg/base/events/TFMGCommonEvents.java b/src/main/java/com/drmangotea/tfmg/base/events/TFMGCommonEvents.java index 0a5326d3..173352e7 100644 --- a/src/main/java/com/drmangotea/tfmg/base/events/TFMGCommonEvents.java +++ b/src/main/java/com/drmangotea/tfmg/base/events/TFMGCommonEvents.java @@ -63,19 +63,7 @@ public class TFMGCommonEvents { TFMG.DEPOSITS.levelLoaded(world); } - @SubscribeEvent - public static void onBlockPlaced(BlockEvent.EntityPlaceEvent event) { - if (event.getEntity() instanceof Player player) { - if (player.getItemInHand(InteractionHand.OFF_HAND).is(TFMGItems.CONFIGURATION_WRENCH.get()) && event.getLevel().getBlockEntity(event.getPos()) instanceof IElectric be && be.canBeInGroups()) { - - be.getData().group.id = player.getItemInHand(InteractionHand.OFF_HAND).get(TFMGDataComponents.CONFIGURATION_WRENCH_NUMBER); - be.updateNextTick(); - be.sendStuff(); - - } - } - } @SubscribeEvent public static void addReloadListeners(AddReloadListenerEvent event) { diff --git a/src/main/java/com/drmangotea/tfmg/base/lang/TFMGTexts.java b/src/main/java/com/drmangotea/tfmg/base/lang/TFMGTexts.java index 1734e4d7..e9c3ed7b 100644 --- a/src/main/java/com/drmangotea/tfmg/base/lang/TFMGTexts.java +++ b/src/main/java/com/drmangotea/tfmg/base/lang/TFMGTexts.java @@ -111,6 +111,7 @@ public class TFMGTexts { public static LangBuilder power(double value) { return TFMGLang.text(" P = " + TFMGTexts.power(value)).color(0xcc4b74); } + } // Voltmeter Tooltips diff --git a/src/main/java/com/drmangotea/tfmg/config/MachineConfig.java b/src/main/java/com/drmangotea/tfmg/config/MachineConfig.java index e43a97ad..5c7e6419 100644 --- a/src/main/java/com/drmangotea/tfmg/config/MachineConfig.java +++ b/src/main/java/com/drmangotea/tfmg/config/MachineConfig.java @@ -12,7 +12,7 @@ public class MachineConfig extends ConfigBase { public final ConfigFloat FEtoWattTickConversionRate = f(1, 0, "FEtoWattTickConversionRate", Comments.FEtoWattTickConversionRate); - public final ConfigInt electrolysisMinimumCurrent = i(10, 1, "electrolysisMinimumCurrent", Comments.electrolysisMinimumCurrent); + public final ConfigInt electrolysisMinimumCurrent = i(5, 1, "electrolysisMinimumCurrent", Comments.electrolysisMinimumCurrent); public final ConfigInt engineMaxLength = i(5, 1, "engineMaxLength", Comments.engineMaxLength); public final ConfigInt surfaceScannerScanDepth = i(-64, -512, "surfaceScannerScanDepth", Comments.surfaceScannerScanDepth); public final ConfigInt polarizerItemChargingRate = i(1000, 1, "polarizerItemChargingRate", Comments.polarizerItemChargingRate); diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricBlockEntity.java index cb8fda24..b7bcf79e 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricBlockEntity.java @@ -1,5 +1,6 @@ package com.drmangotea.tfmg.content.electricity.base; +import com.drmangotea.tfmg.content.electricity.connection.CableHubBlock; import com.simibubi.create.api.equipment.goggles.IHaveHoveringInformation; import com.simibubi.create.foundation.blockEntity.SmartBlockEntity; import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; @@ -20,9 +21,7 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric, public ElectricBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { super(type, pos, state); data.connectNextTick = true; - if (!canBeInGroups()) { - data.group = new ElectricalGroup(-1); - } + } @Override @@ -40,6 +39,8 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric, lazyTickElectricity(); } + + @Override public ElectricBlockValues getData() { return data; @@ -71,12 +72,7 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric, } - @Override - protected void write(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { - super.write(compound, registries, clientPacket); - writeElectricity(compound, clientPacket); - } @Override protected void read(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricBlockValues.java b/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricBlockValues.java index d95dff06..fe70708a 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricBlockValues.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricBlockValues.java @@ -38,8 +38,6 @@ public class ElectricBlockValues { public int failTimer = 0; - public ElectricalGroup group = new ElectricalGroup(0); - public ElectricBlockValues(long pos) { this.electricalNetworkId = pos; } diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricalBlockFailPacket.java b/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricalBlockFailPacket.java new file mode 100644 index 00000000..1b15dc09 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricalBlockFailPacket.java @@ -0,0 +1,37 @@ +package com.drmangotea.tfmg.content.electricity.base; + +import com.drmangotea.tfmg.registry.TFMGPackets; +import com.simibubi.create.foundation.blockEntity.SmartBlockEntity; +import com.simibubi.create.foundation.networking.BlockEntityDataPacket; +import io.netty.buffer.ByteBuf; +import net.minecraft.core.BlockPos; +import net.minecraft.network.codec.StreamCodec; + + +public class ElectricalBlockFailPacket extends BlockEntityDataPacket { + + public static final StreamCodec STREAM_CODEC = StreamCodec.composite( + BlockPos.STREAM_CODEC, packet -> packet.pos, + ElectricalBlockFailPacket::new + ); + + + public ElectricalBlockFailPacket(BlockPos pos) { + super(pos); + } + + @Override + protected void handlePacket(SmartBlockEntity blockEntity) { + + if (blockEntity instanceof IElectric be) { + be.blockFail(); + } + } + + @Override + public PacketTypeProvider getTypeProvider() { + return TFMGPackets.ELECTRICAL_BLOCK_FAIL; + } +} + + diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricalGroup.java b/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricalGroup.java deleted file mode 100644 index 92c7329a..00000000 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricalGroup.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.drmangotea.tfmg.content.electricity.base; - - - -public class ElectricalGroup { - public int id; - public float resistance=0; - public ElectricalGroup(int id){ - this.id = id; - } - - -} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricalNetwork.java b/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricalNetwork.java index 2aaa81ee..0d51da32 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricalNetwork.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/base/ElectricalNetwork.java @@ -1,5 +1,7 @@ package com.drmangotea.tfmg.content.electricity.base; +import com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchBlockEntity; +import com.drmangotea.tfmg.content.electricity.network.transformer.large.LargeTransformerBlockEntity; import com.drmangotea.tfmg.content.electricity.utilities.electric_motor.ElectricMotorBlockEntity; import net.minecraft.core.BlockPos; @@ -11,12 +13,13 @@ import java.util.Map; public class ElectricalNetwork { /** - * This class manages individual networks + * This class manages individual networks */ public ElectricalNetwork(long id) { this.id = id; } + //blocks in the network public List members = new ArrayList<>(); @@ -26,6 +29,7 @@ public class ElectricalNetwork { public long getId() { return id; } + //adds a new block to the network if it is not in it already public void add(IElectric be) { List posList = new ArrayList<>(); @@ -43,7 +47,7 @@ public class ElectricalNetwork { public void updateNetwork() { int maxVoltage = 0; - int resistance = 0; + float resistance = 0; int powerGeneration = 0; @@ -58,13 +62,12 @@ public class ElectricalNetwork { */ for (IElectric member : members) { member.getData().notEnoughPower = false; - int groupId = member.getData().group.id; + member.getData().highestCurrent = 0; maxVoltage = Math.max(member.voltageGeneration(), maxVoltage); - resistance += (int) member.resistance(); + if (member.resistance() != 0) + resistance += 1f / member.resistance(); powerGeneration += member.powerGeneration(); - if (member.canBeInGroups()) - groups.put(groupId, groups.containsKey(groupId) ? groups.get(groupId) + member.resistance() : member.resistance()); } /** * Phase II: @@ -84,11 +87,12 @@ public class ElectricalNetwork { member.getData().setVoltageNextTick = true; member.getData().networkPowerGeneration = powerGeneration; - member.setNetworkResistance(resistance); + if (resistance != 0) { + member.setNetworkResistance(1f / resistance); + }else member.setNetworkResistance(0); member.onNetworkChanged(oldVoltage, oldPower); - if (groups.containsKey(member.getData().group.id)) - member.getData().group.resistance = groups.get(member.getData().group.id); + } } /** @@ -97,9 +101,11 @@ public class ElectricalNetwork { * 2) informs subnetworks */ for (IElectric member : members) { - member.getData().highestCurrent = getCableCurrent(member); + if (member.resistance() == 0) { + member.getData().highestCurrent = getCableCurrent(member); + } if (member instanceof VoltageAlteringBlockEntity be) { be.updateInFront(); } @@ -124,6 +130,10 @@ public class ElectricalNetwork { } if (member instanceof VoltageAlteringBlockEntity be) be.updateInFront = true; + if (member instanceof LargeSwitchBlockEntity be) + be.updateInFront = true; + if (member instanceof LargeTransformerBlockEntity be) + be.updateInFront = true; } } } @@ -131,17 +141,10 @@ public class ElectricalNetwork { public static float getCableCurrent(IElectric be) { float current = 0; - List groups = new ArrayList<>(); + for (IElectric member : be.getOrCreateElectricNetwork().members) { - - if (member.canBeInGroups()) - if (!groups.contains(member.getData().group.id)) { - groups.add(member.getData().group.id); - if (member.resistance() != 0) - - current += member.getData().voltage / member.resistance(); - } + current += member.getCurrent(); } @@ -149,7 +152,6 @@ public class ElectricalNetwork { } - public void checkForLoops(BlockPos pos) { members.forEach(member -> { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/base/IElectric.java b/src/main/java/com/drmangotea/tfmg/content/electricity/base/IElectric.java index 101932ce..f11b2e37 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/base/IElectric.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/base/IElectric.java @@ -1,9 +1,13 @@ package com.drmangotea.tfmg.content.electricity.base; import com.drmangotea.tfmg.TFMG; +import com.drmangotea.tfmg.base.TFMGUtils; +import com.drmangotea.tfmg.base.lang.TFMGLang; import com.drmangotea.tfmg.base.lang.TFMGTexts; import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnection; import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorBlockEntity; +import com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchBlockEntity; +import com.drmangotea.tfmg.content.electricity.network.transformer.large.LargeTransformerBlockEntity; import net.createmod.catnip.platform.CatnipServices; import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; @@ -12,11 +16,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.ChunkPos; -import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; -import net.minecraft.world.level.block.Blocks; -import net.neoforged.neoforge.capabilities.Capabilities; -import net.neoforged.neoforge.energy.IEnergyStorage; import java.util.ArrayList; import java.util.List; @@ -37,7 +37,6 @@ public interface IElectric { LevelAccessor getLevelAccessor(); /** - * * @return true if the block is marked as removed */ default boolean destroyed() { @@ -46,6 +45,7 @@ public interface IElectric { /** * checks if this block is part of a valid network + * * @return block's network if valid, newly created network for this block otherwise */ default ElectricalNetwork getOrCreateElectricNetwork() { @@ -117,8 +117,6 @@ public interface IElectric { * loads data */ default void readElectricity(CompoundTag compound, boolean clientPacket) { - getData().group = new ElectricalGroup(compound.getInt("GroupId")); - getData().group.resistance = compound.getFloat("GroupResistance"); if (!clientPacket) getData().connectNextTick = true; } @@ -126,10 +124,7 @@ public interface IElectric { /** * saves data */ - default void writeElectricity(CompoundTag compound, boolean clientPacket) { - compound.putInt("GroupId", getData().group.id); - compound.putFloat("GroupResistance", getData().group.resistance); - } + /** * handles action that need to happen every tick and checks for scheduled updates @@ -158,24 +153,35 @@ public interface IElectric { } } + default boolean isCable() { + return false; + } + /** * handles actions that need to repeat every second */ default void lazyTickElectricity() { + + if (getPowerUsage() > getData().networkPowerGeneration && !getData().notEnoughPower) + onPlaced(); + if (getData().failTimer >= 4) { + this.blockFail(); + if (getLevelAccessor() instanceof ServerLevel serverLevel) + CatnipServices.NETWORK.sendToClientsTrackingChunk(serverLevel, new ChunkPos(getBlockPos()), new ElectricalBlockFailPacket(BlockPos.of(getPos()))); getData().failTimer = 0; sendStuff(); - } else if ((getData().voltage > getMaxVoltage() && getMaxVoltage() > 0) || (getCurrent() > getMaxCurrent() && getMaxCurrent() > 0)) { + } else if ((getData().voltage > getMaxVoltage() && getMaxVoltage() > 0) || (getCurrent() > getMaxCurrent() && getMaxCurrent() > 0) || ((getData().highestCurrent > getMaxCurrent() && getMaxCurrent() > 0) && isCable())) { + getData().failTimer++; } + } - /** - * WIP, not functional - */ + default int getMaxVoltage() { - return 0; + return 1000; } default int getMaxCurrent() { @@ -211,7 +217,6 @@ public interface IElectric { } /** - * * @return the block's world position */ default BlockPos getBlockPos() { @@ -249,6 +254,13 @@ public interface IElectric { TFMGTexts.header("multimeter").style(ChatFormatting.WHITE) .forGoggles(tooltip); + + if(getMaxVoltage()!=0&&getMaxVoltage()*0.8f < getData().getVoltage()) + TFMGLang.translate("multimeter.approaching_overvoltage").add(TFMGLang.text("("+ TFMGUtils.formatUnits(getMaxVoltage(),"V" +")"))).style(ChatFormatting.RED).forGoggles(tooltip); + if(getMaxCurrent()!=0&&getMaxCurrent()*0.8f 0) { @@ -264,11 +276,6 @@ public interface IElectric { TFMGTexts.Multimeter.power(getPowerUsage()).forGoggles(tooltip, 1); - if (getData().group.id != -1) { - TFMGTexts.Multimeter.separator().forGoggles(tooltip); - TFMGTexts.Multimeter.group(getData().group.id).forGoggles(tooltip, 1); - } - if (isPlayerSneaking) { TFMGTexts.Multimeter.separator().forGoggles(tooltip); TFMGTexts.Multimeter.networkGeneration(getNetworkPowerGeneration()).forGoggles(tooltip, 1); @@ -285,7 +292,6 @@ public interface IElectric { ElectricBlockValues getData(); /** - * * @return true if the network has enough power */ default boolean canWork() { @@ -295,6 +301,7 @@ public interface IElectric { default void blockFail() { getLevelAccessor().destroyBlock(BlockPos.of(getPos()), false); + } default int getPowerUsage() { @@ -345,6 +352,30 @@ public interface IElectric { return (float) powerGeneration() / (float) getData().networkPowerGeneration * getNetworkPowerUsage(); } + default int getBlocksConnectedToNetworkCount(long id) { + + int count = 0; + + for (IElectric member : getOrCreateElectricNetwork().members) { + if (member instanceof VoltageAlteringBlockEntity be && be.getControlledBlock() != null) { + if (be.getControlledBlock().getData().getId() == id) + count++; + } + if (member instanceof LargeSwitchBlockEntity be && be.getControlledBlock() != null) { + if (be.getControlledBlock().getData().getId() == id) + count++; + } + if (member instanceof LargeTransformerBlockEntity be && be.getControlledBlock() != null) { + if (be.getControlledBlock().getData().getId() == id) + count++; + } + + } + + return count; + + } + default float resistance() { return 0; @@ -387,7 +418,8 @@ public interface IElectric { if (be.getData().getId() != getData().getId()) if (be.getData().getVoltage() != 0) if (be.hasElectricitySlot(direction)) { - powerGeneration = Math.max(powerGeneration, be.getPowerUsage()) + 1; + // powerGeneration = Math.max(powerGeneration, be.getPowerUsage()) + 1; + powerGeneration = Math.max(powerGeneration, be.getMaxPowerOutput()); if (powerGeneration > be.getNetworkPowerGeneration()) { powerGeneration = 0; be.data.updatePowerNextTick = true; @@ -404,15 +436,12 @@ public interface IElectric { return getData().networkResistance; } + default boolean networkUndersupplied() { return getNetworkPowerUsage() > getData().networkPowerGeneration; } - default int getMaxAmps() { - return (int) getCurrent(); - } - default float getCurrent() { return getData().getVoltage() == 0 || resistance() == 0 ? 0 : ((float) getData().getVoltage() / (float) resistance()); } @@ -433,17 +462,13 @@ public interface IElectric { default void setVoltage(int newVoltage) { - - if (canBeInGroups()) { - getData().voltage = (int) ((resistance() / getData().group.resistance) * (float) getData().voltageSupply); - return; - } getData().voltage = newVoltage; } - default void setNetworkResistance(int newUsage) { - getData().networkResistance = newUsage; + default void setNetworkResistance(float newUsage) { + + getData().networkResistance = (int) newUsage; } @@ -454,9 +479,5 @@ public interface IElectric { .remove(getPos()); } - default boolean canBeInGroups() { - return false; - } - } \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/base/KineticElectricBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/base/KineticElectricBlockEntity.java index 092ef0e6..6ee30c10 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/base/KineticElectricBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/base/KineticElectricBlockEntity.java @@ -18,9 +18,8 @@ public class KineticElectricBlockEntity extends GeneratingKineticBlockEntity imp public KineticElectricBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { super(type, pos, state); data.connectNextTick = true; - if (!canBeInGroups()) { - data.group = new ElectricalGroup(-1); - } + + } @Override @@ -68,11 +67,7 @@ public class KineticElectricBlockEntity extends GeneratingKineticBlockEntity imp } - @Override - protected void write(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { - super.write(compound,registries , clientPacket); - writeElectricity(compound,clientPacket); - } + @Override protected void read(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/base/VoltageAlteringBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/base/VoltageAlteringBlockEntity.java index 5e27c82e..8d3fb8ab 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/base/VoltageAlteringBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/base/VoltageAlteringBlockEntity.java @@ -40,7 +40,14 @@ public class VoltageAlteringBlockEntity extends ElectricBlockEntity{ } } + public int getMaxPowerOutput(){ + return 10000; + } + @Override + public int getMaxCurrent() { + return 100; + } @Override public int getPowerUsage() { @@ -70,8 +77,11 @@ public class VoltageAlteringBlockEntity extends ElectricBlockEntity{ public float resistance() { Direction facing = getDirection(); if (level.getBlockEntity(getBlockPos().relative(facing)) instanceof IElectric be && be.getData().getId() != data.getId()) { - if (be.hasElectricitySlot(facing.getOpposite())) - return Math.max(be.getNetworkResistance(), 0); + if (be.hasElectricitySlot(facing.getOpposite())){ + int count = getBlocksConnectedToNetworkCount(getControlledBlock().getData().getId()); + if(count!=0) + return Math.max(be.getNetworkResistance()*count, 0); + } } return 0; } diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/configuration_wrench/ElectriciansWrenchItem.java b/src/main/java/com/drmangotea/tfmg/content/electricity/configuration_wrench/ElectriciansWrenchItem.java index ade8a590..26af98f2 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/configuration_wrench/ElectriciansWrenchItem.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/configuration_wrench/ElectriciansWrenchItem.java @@ -46,31 +46,7 @@ public class ElectriciansWrenchItem extends Item { } - @Override - public InteractionResult useOn(UseOnContext context) { - Level level = context.getLevel(); - BlockPos pos = context.getClickedPos(); - Player player = context.getPlayer(); - if(player != null && !player.isShiftKeyDown()) { - if (level.getBlockEntity(pos) instanceof IElectric be && be.canBeInGroups()) { - be.updateNextTick(); - be.sendStuff(); - be.getData().group.id = context.getItemInHand().getOrDefault(TFMGDataComponents.CONFIGURATION_WRENCH_NUMBER, 0); - TFMGUtils.playSound(level, pos, SoundEvents.ITEM_PICKUP, SoundSource.BLOCKS, context.getPlayer()); - if(be instanceof ElectricMotorBlockEntity kineticBE) - kineticBE.delayedUpdate=true; - return InteractionResult.SUCCESS; - } - if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be ) { - be.changeDirection(); - return InteractionResult.SUCCESS; - } - } - - - return super.useOn(context); - } @OnlyIn(Dist.CLIENT) private void openWandGUI(ItemStack itemStack, InteractionHand hand) { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/CableHubBlock.java b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/CableHubBlock.java index d9b8df91..08060773 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/CableHubBlock.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/CableHubBlock.java @@ -11,9 +11,13 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -public class CableHubBlock extends Block implements IBE, IWrenchable { - public CableHubBlock(Properties p_49795_) { - super(p_49795_); +public class CableHubBlock extends Block implements IBE, IWrenchable { + + public int maxCurrent; + + public CableHubBlock(Properties properties, int maxCurrent) { + super(properties); + this.maxCurrent = maxCurrent; } @Override @@ -23,16 +27,17 @@ public class CableHubBlock extends Block implements IBE, IW + @Override public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) { IBE.onRemove(state, level, pos, newState); } @Override - public Class getBlockEntityClass() { - return ElectricBlockEntity.class; + public Class getBlockEntityClass() { + return CableHubBlockEntity.class; } @Override - public BlockEntityType getBlockEntityType() { + public BlockEntityType getBlockEntityType() { return TFMGBlockEntities.CABLE_HUB.get(); } } diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/CableHubBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/CableHubBlockEntity.java new file mode 100644 index 00000000..c7a95c25 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/CableHubBlockEntity.java @@ -0,0 +1,27 @@ +package com.drmangotea.tfmg.content.electricity.connection; + +import com.drmangotea.tfmg.content.electricity.base.ElectricBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +public class CableHubBlockEntity extends ElectricBlockEntity { + public CableHubBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); + } + + @Override + public int getMaxCurrent() { + return ((CableHubBlock)getBlockState().getBlock()).maxCurrent; + } + + @Override + public int getMaxVoltage() { + return 5000; + } + + @Override + public boolean isCable() { + return true; + } +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/cables/CableConnectorBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/cables/CableConnectorBlockEntity.java index 0b257b05..78375fa9 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/cables/CableConnectorBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/cables/CableConnectorBlockEntity.java @@ -71,6 +71,10 @@ public class CableConnectorBlockEntity extends ElectricBlockEntity implements IH notifyRemoval(); } + @Override + public int getMaxVoltage() { + return 100000; + } @Override public boolean hasElectricitySlot(Direction direction) { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/copycat_cable/CopycatCableBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/copycat_cable/CopycatCableBlockEntity.java index 57173f1a..ad1c8a5e 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/copycat_cable/CopycatCableBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/copycat_cable/CopycatCableBlockEntity.java @@ -20,9 +20,7 @@ public class CopycatCableBlockEntity extends CopycatBlockEntity implements IElec public CopycatCableBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { super(type, pos, state); data.connectNextTick = true; - if (!canBeInGroups()) { - data.group = new ElectricalGroup(-1); - } + } @Override @@ -71,12 +69,7 @@ public class CopycatCableBlockEntity extends CopycatBlockEntity implements IElec tickElectricity(); } - @Override - protected void write(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { - super.write(compound,registries , clientPacket); - writeElectricity(compound,clientPacket); - } @Override protected void read(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/diagonal/DiagonalCableBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/diagonal/DiagonalCableBlockEntity.java index 5baac2f0..fb930168 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/diagonal/DiagonalCableBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/diagonal/DiagonalCableBlockEntity.java @@ -16,6 +16,10 @@ public class DiagonalCableBlockEntity extends ElectricBlockEntity { super(type, pos, state); } + @Override + public int getMaxVoltage() { + return 100000; + } @Override public boolean hasElectricitySlot(Direction direction) { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/tube/CableTubeBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/tube/CableTubeBlockEntity.java index 896409b5..d048690e 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/connection/tube/CableTubeBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/connection/tube/CableTubeBlockEntity.java @@ -15,7 +15,10 @@ public class CableTubeBlockEntity extends ElectricBlockEntity { super(type, pos, state); } - + @Override + public int getMaxVoltage() { + return 10000; + } @Override public boolean hasElectricitySlot(Direction direction) { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/display_link/network/NetIdDisplaySource.java b/src/main/java/com/drmangotea/tfmg/content/electricity/display_link/network/NetIdDisplaySource.java index f691d91f..a023aef6 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/display_link/network/NetIdDisplaySource.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/display_link/network/NetIdDisplaySource.java @@ -19,11 +19,11 @@ public class NetIdDisplaySource extends SingleLineDisplaySource { if (!(smart instanceof IElectric electric)) return EMPTY_LINE; - int id = electric.getData().group.id; + double id = electric.getOrCreateElectricNetwork().id; if (smart.getBehaviour(ObservedElectricBehaviour.TYPE) != null) { IElectric observed = smart.getBehaviour(ObservedElectricBehaviour.TYPE).getObservedElectric(); - if (observed != null) id = observed.getData().group.id; + if (observed != null) id = observed.getOrCreateElectricNetwork().id; } if (id == -1) return EMPTY_LINE; diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/generators/creative_generator/CreativeGeneratorBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/generators/creative_generator/CreativeGeneratorBlockEntity.java index 272f52e8..3a08345d 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/generators/creative_generator/CreativeGeneratorBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/generators/creative_generator/CreativeGeneratorBlockEntity.java @@ -36,6 +36,15 @@ public class CreativeGeneratorBlockEntity extends ElectricBlockEntity { behaviours.add(outputVoltage); } + @Override + public int getMaxVoltage() { + return 0; + } + + @Override + public int getMaxCurrent() { + return 0; + } public static void update(CreativeGeneratorBlockEntity be){ be.updateNextTick();; @@ -48,7 +57,7 @@ public class CreativeGeneratorBlockEntity extends ElectricBlockEntity { @Override public int powerGeneration() { - return outputVoltage.getValue()*100; + return 999999999; } class CreativeGeneratorValueBox extends ValueBoxTransform.Sided { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/RotorBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/RotorBlockEntity.java index 34feb9af..cd839582 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/RotorBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/RotorBlockEntity.java @@ -31,6 +31,7 @@ public class RotorBlockEntity extends KineticElectricBlockEntity { boolean findNextTick = false; + List stators = new ArrayList<>(); public static final Map> statorPosition = setStatorPositons(); @@ -50,6 +51,12 @@ public class RotorBlockEntity extends KineticElectricBlockEntity { visualSpeed.chase(getGeneratedSpeed(), 1 / 128f, LerpedFloat.Chaser.EXP); } + + @Override + public int getMaxVoltage() { + return 10000; + } + @Override public void tick() { super.tick(); diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/StatorBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/StatorBlockEntity.java index 5003a56b..3d09cd5e 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/StatorBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/StatorBlockEntity.java @@ -31,7 +31,10 @@ public class StatorBlockEntity extends ElectricBlockEntity implements IHaveGoggl } - + @Override + public int getMaxVoltage() { + return 10000; + } @Override public void tick() { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/lights/LightBulbBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/lights/LightBulbBlockEntity.java index 1ef60eb0..40d35151 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/lights/LightBulbBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/lights/LightBulbBlockEntity.java @@ -62,6 +62,11 @@ public class LightBulbBlockEntity extends ElectricBlockEntity { notifyUpdate(); } + @Override + public int getMaxCurrent() { + return 1; + } + @Override public void blockFail() { @@ -106,10 +111,7 @@ public class LightBulbBlockEntity extends ElectricBlockEntity { color = NBTHelper.readEnum(compound,"color",DyeColor.class); } - @Override - public boolean canBeInGroups() { - return true; - } + protected void analogSignalChanged(int newSignal) { hasSignal = newSignal > 0; diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/lights/neon_tube/NeonTubeBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/lights/neon_tube/NeonTubeBlockEntity.java index ac5fdca1..ca8f69c0 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/lights/neon_tube/NeonTubeBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/lights/neon_tube/NeonTubeBlockEntity.java @@ -25,9 +25,10 @@ public class NeonTubeBlockEntity extends ElectricBlockEntity { } @Override - public boolean canBeInGroups() { - return true; + public int getMaxCurrent() { + return 1; } + @Override public void tick() { super.tick(); diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchBlock.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchBlock.java new file mode 100644 index 00000000..b6ef77e7 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchBlock.java @@ -0,0 +1,131 @@ +package com.drmangotea.tfmg.content.electricity.network.large_switch; + +import com.drmangotea.tfmg.base.TFMGShapes; +import com.drmangotea.tfmg.content.electricity.base.IElectric; +import com.drmangotea.tfmg.registry.TFMGBlockEntities; +import com.simibubi.create.content.kinetics.base.HorizontalKineticBlock; +import com.simibubi.create.foundation.block.IBE; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +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.BooleanProperty; +import net.minecraft.world.level.storage.loot.LootParams; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.List; + +public class LargeSwitchBlock extends HorizontalKineticBlock implements IBE { + + public static final BooleanProperty IS_MAIN_PART = BooleanProperty.create("is_main_part"); + + public LargeSwitchBlock(Properties properties) { + super(properties); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + builder.add(IS_MAIN_PART); + } + @Override + public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { + super.setPlacedBy(level, pos, state, placer, stack); + if (!level.isClientSide) { + BlockPos blockpos = pos.relative(state.getValue(HORIZONTAL_FACING)); + level.setBlock(blockpos, state.setValue(IS_MAIN_PART, false), 3); + level.blockUpdated(pos, Blocks.AIR); + state.updateNeighbourShapes(level, pos, 3); + } + } + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + return state.getValue(IS_MAIN_PART) ? TFMGShapes.LARGE_SWITCH_PRIMARY.get(state.getValue(HORIZONTAL_FACING)) : TFMGShapes.LARGE_SWITCH_SECONDARY.get(state.getValue(HORIZONTAL_FACING)); + } + + private static Direction getNeighbourDirection(boolean mainPart, Direction direction) { + return mainPart ? direction : direction.getOpposite(); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + Level level = context.getLevel(); + BlockPos pos = context.getClickedPos(); + + BlockPos neighbourPos = pos.relative(context.getHorizontalDirection().getOpposite()); + + + + if(!level.getBlockState(neighbourPos).isAir()) + return null; + return super.getStateForPlacement(context); + } + + @Override + protected List getDrops(BlockState state, LootParams.Builder params) { + + if(!state.getValue(IS_MAIN_PART)) + return new ArrayList<>(); + + return super.getDrops(state, params); + } + + @Override + protected BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) { + if (facing == getNeighbourDirection(state.getValue(IS_MAIN_PART), state.getValue(HORIZONTAL_FACING))) { + if(!(facingState.is(this) && facingState.getValue(IS_MAIN_PART) != state.getValue(IS_MAIN_PART))) + + return Blocks.AIR.defaultBlockState(); + } + return super.updateShape(state, facing, facingState, level, currentPos, facingPos); + + } + + @Override + public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) { + if(!state.getValue(IS_MAIN_PART)) + return false; + + return state.getValue(HORIZONTAL_FACING).getClockWise().getAxis() == face.getAxis(); + + } + + + + @Override + public void onPlace(BlockState pState, Level level, BlockPos pos, BlockState pOldState, boolean pIsMoving) { + withBlockEntityDo(level, pos, IElectric::onPlaced); + } + @Override + public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) { + IBE.onRemove(state, level, pos, newState); + } + @Override + public Direction.Axis getRotationAxis(BlockState state) { + return state.getValue(HORIZONTAL_FACING).getClockWise().getAxis(); + } + + @Override + public Class getBlockEntityClass() { + return LargeSwitchBlockEntity.class; + } + + @Override + public BlockEntityType getBlockEntityType() { + return TFMGBlockEntities.LARGE_SWITCH.get(); + } +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchBlockEntity.java new file mode 100644 index 00000000..1cf629ef --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchBlockEntity.java @@ -0,0 +1,217 @@ +package com.drmangotea.tfmg.content.electricity.network.large_switch; + +import com.drmangotea.tfmg.base.lang.TFMGLang; +import com.drmangotea.tfmg.content.electricity.base.IElectric; +import com.drmangotea.tfmg.content.electricity.base.KineticElectricBlockEntity; +import com.drmangotea.tfmg.content.electricity.base.UpdateInFrontPacket; +import net.createmod.catnip.animation.LerpedFloat; +import net.createmod.catnip.platform.CatnipServices; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.block.DirectionalBlock; +import net.minecraft.world.level.block.HorizontalDirectionalBlock; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.List; + +import static com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchBlock.IS_MAIN_PART; +import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING; + +public class LargeSwitchBlockEntity extends KineticElectricBlockEntity { + public boolean updateInFront = false; + + public boolean closed = false; + + public LerpedFloat visualAngle = LerpedFloat.angular(); + public float angle = 900; + + final boolean isMainPart; + + public LargeSwitchBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); + isMainPart = state.getValue(IS_MAIN_PART); + visualAngle.setValue(90); + } + + + public int voltageGeneration() { + + if (isMainPart) + return 0; + + int voltageGeneration = 0; + + + if (getLevelAccessor().getBlockEntity(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING).getOpposite())) instanceof LargeSwitchBlockEntity be) + if (be.getData().getId() != getData().getId()) + if (be.getData().getVoltage() != 0) + if (be.closed) { + voltageGeneration = Math.max(voltageGeneration, be.data.getVoltage()); + getData().getsOutsidePower = true; + } + + if (voltageGeneration == 0) + getData().getsOutsidePower = false; + + return voltageGeneration; + } + + @Override + public int getMaxCurrent() { + return 1000; + } + + @Override + public int getMaxVoltage() { + return 100000; + } + + @Override + public void lazyTick() { + super.lazyTick(); + if(data.notEnoughPower&&!getBlockState().getValue(IS_MAIN_PART)) + if(level.getBlockEntity(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING).getOpposite()))instanceof LargeSwitchBlockEntity be) + be.onPlaced(); + } + + public IElectric getControlledBlock() { + Direction facing = getBlockState().getValue(HORIZONTAL_FACING); + if(level.getBlockEntity(getBlockPos().relative(facing))instanceof LargeSwitchBlockEntity be){ + return be; + } + return null; + } + @Override + public float resistance() { + if (!isMainPart) + return 0; + if(!closed) + return 0; + + Direction facing = getBlockState().getValue(HORIZONTAL_FACING); + if (level.getBlockEntity(getBlockPos().relative(facing)) instanceof IElectric be && be.getData().getId() != data.getId()) { + int count = getBlocksConnectedToNetworkCount(getControlledBlock().getData().getId()); + if(count!=0) + return Math.max(be.getNetworkResistance()*count, 0); + } + return 0; + } + + @Override + public void onNetworkChanged(int oldVoltage, int oldPower) { + super.onNetworkChanged(oldVoltage, oldPower); + + if (oldVoltage != getData().getVoltage() || oldPower != getPowerUsage()) { + updateInFront = true; + } + sendStuff(); + setChanged(); + } + + public int powerGeneration() { + + if (isMainPart) + return 0; + + if(level.getBlockEntity(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING).getOpposite())) instanceof LargeSwitchBlockEntity be&&be.data.notEnoughPower) + return 0; + + int powerGeneration = 0; + + + if (getLevelAccessor().getBlockEntity(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING).getOpposite())) instanceof LargeSwitchBlockEntity be) + if (be.getData().getId() != getData().getId()) + if (be.getData().getVoltage() != 0) + if (be.closed) { + powerGeneration = Math.max(powerGeneration, 10000); + getData().getsOutsidePower = true; + } + + if (powerGeneration == 0) + getData().getsOutsidePower = false; + + return powerGeneration; + } + + public void updateInFront() { + + if (level instanceof ServerLevel serverLevel) + CatnipServices.NETWORK.sendToClientsTrackingChunk(serverLevel, new ChunkPos(worldPosition), new UpdateInFrontPacket(BlockPos.of(getPos()))); + Direction facing = getBlockState().getValue(HORIZONTAL_FACING); + if (level.getBlockEntity(getBlockPos().relative(facing)) instanceof IElectric be && be.getData().getId() != data.getId()) { + be.updateNextTick(); + + } + sendStuff(); + setChanged(); + } + + + @Override + public void tick() { + super.tick(); + if (level.isClientSide) { + visualAngle.chase(angle / 10d, 1d, LerpedFloat.Chaser.EXP); + visualAngle.tickChaser(); + } + if(updateInFront) { + updateInFront(); + updateInFront = false; + } + if (!isMainPart) + return; + if (angle < 0) + angle = 0; + if (angle > 900) + angle = 900; + if (getSpeed() == 0) + return; + + if (getSpeed() < 0 && angle != 900) { + angle += getArmSpeed(); + } + if (getSpeed() > 0 && angle != 0) { + angle -= getArmSpeed(); + } + + boolean oldValue = closed; + + if (data.voltage < 1000) { + closed = angle == 0; + } else { + closed = angle < data.voltage / 700f; + } + + if (oldValue != closed) + updateInFront(); + + + + + } + + @Override + public boolean makeMultimeterTooltip(List tooltip, boolean isPlayerSneaking) { + super.makeMultimeterTooltip(tooltip, isPlayerSneaking); + + + + return true; + } + + public float getArmSpeed() { + return Math.abs(getSpeed()) * 0.3f; + } + + + @Override + public boolean hasElectricitySlot(Direction direction) { + + return (direction == getBlockState().getValue(HORIZONTAL_FACING).getOpposite() && getBlockState().getValue(IS_MAIN_PART)) || (direction == getBlockState().getValue(HORIZONTAL_FACING) && !getBlockState().getValue(IS_MAIN_PART)); + + } +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchGenerator.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchGenerator.java new file mode 100644 index 00000000..1e70677e --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchGenerator.java @@ -0,0 +1,43 @@ +package com.drmangotea.tfmg.content.electricity.network.large_switch; + +import com.drmangotea.tfmg.content.electricity.utilities.converter.ConverterBlock; +import com.simibubi.create.content.kinetics.base.HorizontalKineticBlock; +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.HorizontalDirectionalBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.client.model.generators.ModelFile; + +import static com.simibubi.create.foundation.data.AssetLookup.partialBaseModel; + +public class LargeSwitchGenerator extends SpecialBlockStateGen { + + + @Override + protected int getXRotation(BlockState state) { + return 0; + } + + @Override + protected int getYRotation(BlockState state) { + + return switch (state.getValue(HorizontalKineticBlock.HORIZONTAL_FACING)) { + case NORTH -> 180; + case SOUTH -> 0; + case WEST -> 90; + case EAST -> 270; + case DOWN -> 90; + case UP -> 90; + }; + } + + @Override + public ModelFile getModel(DataGenContext ctx, RegistrateBlockstateProvider prov, + BlockState state) { + return !state.getValue(LargeSwitchBlock.IS_MAIN_PART) ? partialBaseModel(ctx, prov, "secondary") + : partialBaseModel(ctx, prov,"primary"); + } + +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchRenderer.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchRenderer.java new file mode 100644 index 00000000..b603747e --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchRenderer.java @@ -0,0 +1,69 @@ +package com.drmangotea.tfmg.content.electricity.network.large_switch; + +import com.drmangotea.tfmg.content.machinery.misc.winding_machine.WindingMachineBlockEntity; +import com.drmangotea.tfmg.registry.TFMGItems; +import com.drmangotea.tfmg.registry.TFMGPartialModels; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.simibubi.create.AllPartialModels; +import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer; +import dev.engine_room.flywheel.lib.transform.TransformStack; +import net.createmod.catnip.render.CachedBuffers; +import net.createmod.catnip.render.SuperByteBuffer; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.world.item.ItemDisplayContext; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.common.Tags; + +import static com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchBlock.IS_MAIN_PART; +import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING; +import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING; + +public class LargeSwitchRenderer extends KineticBlockEntityRenderer { + public LargeSwitchRenderer(BlockEntityRendererProvider.Context context) { + super(context); + } + + @Override + protected void renderSafe(LargeSwitchBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource bufferSource, int light, int overlay) { + + if(!be.getBlockState().getValue(IS_MAIN_PART)) + return; + + BlockState blockState = be.getBlockState(); + + VertexConsumer vb = bufferSource.getBuffer(RenderType.solid()); + + CachedBuffers.partial(TFMGPartialModels.LARGE_SWITCH_ARM, blockState) + .light(light) + .center() + .rotateYDegrees(blockState.getValue(HORIZONTAL_FACING).getAxis() == Direction.Axis.Z ? Math.abs(blockState.getValue(FACING).toYRot() ) : blockState.getValue(FACING).toYRot()- 180) + .translateY(8/16f) + .rotateXDegrees(-be.visualAngle.getValue(partialTicks)) + .uncenter() + .renderInto(ms, vb); + + + super.renderSafe(be, partialTicks, ms, bufferSource, light, overlay); + } + + @Override + protected SuperByteBuffer getRotatedModel(LargeSwitchBlockEntity be, BlockState state) { + + if(!state.getValue(IS_MAIN_PART)) + return CachedBuffers.partialFacing(TFMGPartialModels.LARGE_SWITCH_BUFFER, state, state + .getValue(FACING).getCounterClockWise()); + + return CachedBuffers.partialFacing(TFMGPartialModels.LARGE_SWITCH_SHAFT, state, state + .getValue(FACING).getCounterClockWise()); + } + + +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchVisual.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchVisual.java new file mode 100644 index 00000000..ef6d3b9b --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/large_switch/LargeSwitchVisual.java @@ -0,0 +1,64 @@ +package com.drmangotea.tfmg.content.electricity.network.large_switch; + +import com.drmangotea.tfmg.content.machinery.misc.winding_machine.WindingMachineBlockEntity; +import com.drmangotea.tfmg.registry.TFMGPartialModels; +import com.simibubi.create.AllPartialModels; +import com.simibubi.create.content.kinetics.base.KineticBlockEntityVisual; +import com.simibubi.create.content.kinetics.base.RotatingInstance; +import com.simibubi.create.foundation.render.AllInstanceTypes; +import dev.engine_room.flywheel.api.instance.Instance; +import dev.engine_room.flywheel.api.visualization.VisualizationContext; +import dev.engine_room.flywheel.lib.model.Models; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; + +import java.util.function.Consumer; + +import static com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchBlock.IS_MAIN_PART; +import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING; + +public class LargeSwitchVisual extends KineticBlockEntityVisual { + protected final RotatingInstance shaft; + + public LargeSwitchVisual(VisualizationContext context, LargeSwitchBlockEntity blockEntity, float partialTick) { + super(context, blockEntity, partialTick); + + Direction facing = blockEntity.getBlockState().getValue(HORIZONTAL_FACING).getCounterClockWise(); + if(!blockEntity.getBlockState().getValue(IS_MAIN_PART)) { + shaft = null; + return; + } + shaft = instancerProvider().instancer(AllInstanceTypes.ROTATING, Models.partial(TFMGPartialModels.LARGE_SWITCH_SHAFT)) + .createInstance(); + + shaft.setup(blockEntity) + .setPosition(getVisualPosition()) + .rotateToFace(Direction.SOUTH, facing) + .setChanged(); + } + + @Override + public void update(float pt) { + shaft.setup(blockEntity) + .setChanged(); + + } + + @Override + public void updateLight(float partialTick) { + Direction facing = blockEntity.getBlockState().getValue(HORIZONTAL_FACING).getCounterClockWise(); + BlockPos behind = pos.relative(facing); + relight(behind, shaft); + + } + + @Override + protected void _delete() { + shaft.delete(); + } + + @Override + public void collectCrumblingInstances(Consumer consumer) { + consumer.accept(shaft); + } +} \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeCoilBlock.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeCoilBlock.java new file mode 100644 index 00000000..82efa247 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeCoilBlock.java @@ -0,0 +1,75 @@ +package com.drmangotea.tfmg.content.electricity.network.transformer.large; + +import com.drmangotea.tfmg.content.electricity.storage.AccumulatorBlockEntity; +import com.drmangotea.tfmg.registry.TFMGBlockEntities; +import com.drmangotea.tfmg.registry.TFMGBlocks; +import com.drmangotea.tfmg.registry.TFMGDataComponents; +import com.simibubi.create.AllSoundEvents; +import com.simibubi.create.foundation.block.IBE; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.ItemInteractionResult; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +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.material.FluidState; +import net.minecraft.world.level.storage.loot.LootParams; +import net.minecraft.world.phys.BlockHitResult; + +import java.util.Collections; +import java.util.List; + +public class LargeCoilBlock extends Block implements IBE { + public LargeCoilBlock(Properties properties) { + super(properties); + } + + @Override + public void setPlacedBy(Level level, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { + super.setPlacedBy(level, pos, state, placer, stack); + withBlockEntityDo(level, pos, be -> be.setCapacity(stack)); + } + + @Override + public List getDrops(BlockState p_287732_, LootParams.Builder p_287596_) { + return Collections.emptyList(); + } + + @Override + protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + if(stack.is(TFMGBlocks.LAMINATED_MAGNETIC_ALLOY_BLOCK.asItem())){ + if(level.getBlockEntity(pos) instanceof LargeCoilBlockEntity be) + return be.createTransformer(player,player.getNearestViewDirection()); + + } + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + } + + @Override + public boolean onDestroyedByPlayer(BlockState state, Level level, BlockPos pos, Player player, boolean willHarvest, FluidState fluid) { + if(!player.isCreative()&&level.getBlockEntity(pos) instanceof LargeCoilBlockEntity be) { + ItemStack item = TFMGBlocks.LARGE_COIL.asItem().getDefaultInstance(); + item.set(TFMGDataComponents.COIL_TURNS, be.turns); + ItemEntity itemToSpawn = new ItemEntity((Level) level, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f, item); + if (itemToSpawn.getItem().getCount() > 0) + level.addFreshEntity(itemToSpawn); + } + return super.onDestroyedByPlayer(state, level, pos, player, willHarvest, fluid); + } + + @Override + public Class getBlockEntityClass() { + return LargeCoilBlockEntity.class; + } + + @Override + public BlockEntityType getBlockEntityType() { + return TFMGBlockEntities.LARGE_COIL.get(); + } +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeCoilBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeCoilBlockEntity.java new file mode 100644 index 00000000..fd260b62 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeCoilBlockEntity.java @@ -0,0 +1,101 @@ +package com.drmangotea.tfmg.content.electricity.network.transformer.large; + +import com.drmangotea.tfmg.base.TFMGUtils; +import com.drmangotea.tfmg.registry.TFMGBlocks; +import com.drmangotea.tfmg.registry.TFMGDataComponents; +import com.simibubi.create.foundation.blockEntity.SmartBlockEntity; +import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.HolderLookup; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.ItemInteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.ArrayList; +import java.util.List; + +public class LargeCoilBlockEntity extends SmartBlockEntity { + + int turns = 0; + + public LargeCoilBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); + } + + public ItemInteractionResult createTransformer(Player player, Direction lookingDirection) { + BlockPos otherCoilPos = null; + Direction otherCoilDirection; + List coilDirections = new ArrayList<>(); + for (Direction direction : Direction.values()) { + if (!direction.getAxis().isVertical()) { + BlockPos coilPos = getBlockPos().relative(direction); + if (level.getBlockState(coilPos).is(TFMGBlocks.LARGE_COIL)) + coilDirections.add(direction); + + } + } + if (coilDirections.isEmpty()) + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + + + if (coilDirections.size() == 1) { + otherCoilDirection = coilDirections.get(0); + } else { + if (coilDirections.contains(lookingDirection)) { + otherCoilDirection = lookingDirection; + } else otherCoilDirection = coilDirections.get(0); + } + otherCoilPos = getBlockPos().relative(otherCoilDirection); + if (level.getBlockEntity(otherCoilPos) instanceof LargeCoilBlockEntity be) { + float primaryTurns = turns; + float secondaryTurns = be.turns; + + float turnRatio = secondaryTurns/primaryTurns; + + if (!level.isClientSide) { + level.setBlock(otherCoilPos, TFMGBlocks.LARGE_TRANSFORMER.getDefaultState().setValue(LargeTransformerBlock.HORIZONTAL_FACING, otherCoilDirection).setValue(LargeTransformerBlock.IS_MAIN_PART, false), 3); + + } + if(level.getBlockEntity(otherCoilPos) instanceof LargeTransformerBlockEntity transformerBe) + transformerBe.turnRatio = turnRatio; + if (!level.isClientSide) { + + level.setBlock(getBlockPos(), TFMGBlocks.LARGE_TRANSFORMER.getDefaultState().setValue(LargeTransformerBlock.HORIZONTAL_FACING, otherCoilDirection), 3); + } + + + + TFMGUtils.playSound(level, getBlockPos(), SoundEvents.NETHERITE_BLOCK_PLACE, SoundSource.BLOCKS); + return ItemInteractionResult.SUCCESS; + } + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + } + + public void setCapacity(ItemStack stack) { + if (stack.get(TFMGDataComponents.COIL_TURNS) != null) + turns = stack.getOrDefault(TFMGDataComponents.COIL_TURNS, 0); + } + + @Override + protected void read(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.read(tag, registries, clientPacket); + turns = tag.getInt("Turns"); + } + + @Override + protected void write(CompoundTag tag, HolderLookup.Provider registries, boolean clientPacket) { + super.write(tag, registries, clientPacket); + tag.putInt("Turns", turns); + } + + @Override + public void addBehaviours(List behaviours) { + + } +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeElectromagneticCoilItem.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeElectromagneticCoilItem.java new file mode 100644 index 00000000..a9302e2b --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeElectromagneticCoilItem.java @@ -0,0 +1,36 @@ +package com.drmangotea.tfmg.content.electricity.network.transformer.large; + + +import com.drmangotea.tfmg.base.lang.TFMGLang; +import com.drmangotea.tfmg.registry.TFMGDataComponents; +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.block.Block; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.api.distmarker.OnlyIn; + +import java.util.List; + +public class LargeElectromagneticCoilItem extends BlockItem { + + + public LargeElectromagneticCoilItem(Block block, Properties properties) { + super(block, properties); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void appendHoverText(ItemStack stack, TooltipContext context, List tooltip, TooltipFlag flag) { + String text = TFMGLang.translateDirect("tooltip.coils").getString(); + + tooltip.add(TFMGLang.text(text+stack.getOrDefault(TFMGDataComponents.COIL_TURNS,0)).component().withStyle(ChatFormatting.GREEN) + + ); + super.appendHoverText(stack, context, tooltip, flag); + } + +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeTransformerBlock.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeTransformerBlock.java new file mode 100644 index 00000000..f6c588d8 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeTransformerBlock.java @@ -0,0 +1,162 @@ +package com.drmangotea.tfmg.content.electricity.network.transformer.large; + +import com.drmangotea.tfmg.base.TFMGShapes; +import com.drmangotea.tfmg.content.electricity.base.IElectric; +import com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchBlock; +import com.drmangotea.tfmg.content.engines.base.EngineBlock; +import com.drmangotea.tfmg.registry.TFMGBlockEntities; +import com.drmangotea.tfmg.registry.TFMGBlocks; +import com.simibubi.create.content.kinetics.base.HorizontalKineticBlock; +import com.simibubi.create.foundation.block.IBE; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.ItemInteractionResult; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +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.BooleanProperty; +import net.minecraft.world.level.storage.loot.LootParams; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.List; + +public class LargeTransformerBlock extends HorizontalKineticBlock implements IBE { + + public static final BooleanProperty IS_MAIN_PART = LargeSwitchBlock.IS_MAIN_PART; + public static final BooleanProperty UNFINISHED_MODEL = BooleanProperty.create("unfinished_model"); + + + public LargeTransformerBlock(Properties properties) { + super(properties); + registerDefaultState(defaultBlockState().setValue(UNFINISHED_MODEL, true)); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + super.createBlockStateDefinition(builder); + builder.add(IS_MAIN_PART,UNFINISHED_MODEL); + } + + + + @Override + public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { + super.setPlacedBy(level, pos, state, placer, stack); + if (!level.isClientSide) { + BlockPos blockpos = pos.relative(state.getValue(HORIZONTAL_FACING)); + level.setBlock(blockpos, state.setValue(IS_MAIN_PART, false), 3); + level.blockUpdated(pos, Blocks.AIR); + state.updateNeighbourShapes(level, pos, 3); + } + } + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + if(!state.getValue(IS_MAIN_PART)) { + return state.getValue(UNFINISHED_MODEL) ? TFMGShapes.LARGE_TRANSFORMER_UNFINISHED.get(state.getValue(HORIZONTAL_FACING)) : TFMGShapes.LARGE_TRANSFORMER.get(state.getValue(HORIZONTAL_FACING).getOpposite()); + }else return state.getValue(UNFINISHED_MODEL) ? TFMGShapes.LARGE_TRANSFORMER_UNFINISHED.get(state.getValue(HORIZONTAL_FACING).getOpposite()) : TFMGShapes.LARGE_TRANSFORMER.get(state.getValue(HORIZONTAL_FACING)); + } + + private static Direction getNeighbourDirection(boolean mainPart, Direction direction) { + return mainPart ? direction : direction.getOpposite(); + } + + @Override + protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { + + BlockPos mainPartPos = pos; + + if(!state.getValue(IS_MAIN_PART)) + mainPartPos = pos.relative(state.getValue(HORIZONTAL_FACING).getOpposite()); + + if(level.getBlockEntity(mainPartPos) instanceof LargeTransformerBlockEntity be){ + return be.addComponent(stack,player,hand); + } + + + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + Level level = context.getLevel(); + BlockPos pos = context.getClickedPos(); + + BlockPos neighbourPos = pos.relative(context.getHorizontalDirection().getOpposite()); + + + + if(!level.getBlockState(neighbourPos).is(TFMGBlocks.LARGE_COIL)) + return null; + return super.getStateForPlacement(context); + } + + @Override + protected List getDrops(BlockState state, LootParams.Builder params) { + + if(!state.getValue(IS_MAIN_PART)) + return new ArrayList<>(); + + return super.getDrops(state, params); + } + + @Override + protected BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) { + if (facing == getNeighbourDirection(state.getValue(IS_MAIN_PART), state.getValue(HORIZONTAL_FACING))) { + if(!(facingState.is(this) && facingState.getValue(IS_MAIN_PART) != state.getValue(IS_MAIN_PART))) + + return Blocks.AIR.defaultBlockState(); + } + return super.updateShape(state, facing, facingState, level, currentPos, facingPos); + + } + + @Override + public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) { + if(!state.getValue(IS_MAIN_PART)) + return false; + + return state.getValue(HORIZONTAL_FACING).getClockWise().getAxis() == face.getAxis(); + + } + + + + @Override + public void onPlace(BlockState pState, Level level, BlockPos pos, BlockState pOldState, boolean pIsMoving) { + withBlockEntityDo(level, pos, IElectric::onPlaced); + } + @Override + public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) { + IBE.onRemove(state, level, pos, newState); + } + @Override + public Direction.Axis getRotationAxis(BlockState state) { + return state.getValue(HORIZONTAL_FACING).getClockWise().getAxis(); + } + + @Override + public Class getBlockEntityClass() { + return LargeTransformerBlockEntity.class; + } + + @Override + public BlockEntityType getBlockEntityType() { + return TFMGBlockEntities.LARGE_TRANSFORMER.get(); + } +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeTransformerBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeTransformerBlockEntity.java new file mode 100644 index 00000000..6e102e72 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeTransformerBlockEntity.java @@ -0,0 +1,263 @@ +package com.drmangotea.tfmg.content.electricity.network.transformer.large; + +import com.drmangotea.tfmg.base.TFMGUtils; +import com.drmangotea.tfmg.base.lang.TFMGLang; +import com.drmangotea.tfmg.base.lang.TFMGTexts; +import com.drmangotea.tfmg.content.electricity.base.IElectric; +import com.drmangotea.tfmg.content.electricity.base.KineticElectricBlockEntity; +import com.drmangotea.tfmg.content.electricity.base.UpdateInFrontPacket; +import com.simibubi.create.foundation.data.recipe.CommonMetal; +import net.createmod.catnip.platform.CatnipServices; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.HolderLookup; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.ItemInteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.List; + +import static com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchBlock.IS_MAIN_PART; +import static com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider.F.lubricationOil; +import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING; + +public class LargeTransformerBlockEntity extends KineticElectricBlockEntity { + public boolean updateInFront = false; + + + public float turnRatio = 1; + + + final boolean isMainPart; + + public TransformerConstructionState constructionState = TransformerConstructionState.NEEDS_STEEL; + + public LargeTransformerBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); + isMainPart = state.getValue(IS_MAIN_PART); + } + + @Override + public int getPowerUsage() { + + if (super.getPowerUsage() == 0) + return 0; + + if (isMainPart && level.getBlockEntity(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING))) instanceof LargeTransformerBlockEntity be) + return (int) ((int) Math.pow(be.data.getVoltage(), 2) / resistance()); + + return super.getPowerUsage(); + } + + public ItemInteractionResult addComponent(ItemStack stack, Player player, InteractionHand hand) { + + + if (constructionState == TransformerConstructionState.NEEDS_STEEL && stack.is(CommonMetal.STEEL.storageBlocks.items())) { + if (!player.isCreative()) + player.getItemInHand(hand).shrink(1); + TFMGUtils.playSound(level, getBlockPos(), SoundEvents.NETHERITE_BLOCK_PLACE, SoundSource.BLOCKS); + constructionState = TransformerConstructionState.NEEDS_OIL; + + if (level.getBlockEntity(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING))) instanceof LargeTransformerBlockEntity be) { + turnRatio = be.turnRatio; + be.constructionState = constructionState; + } + level.setBlock(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING)), getBlockState().setValue(LargeTransformerBlock.UNFINISHED_MODEL, false).setValue(LargeTransformerBlock.IS_MAIN_PART, false), 3); + level.setBlock(getBlockPos(), getBlockState().setValue(LargeTransformerBlock.UNFINISHED_MODEL, false), 3); + onPlaced(); + return ItemInteractionResult.SUCCESS; + } + if (constructionState == TransformerConstructionState.NEEDS_OIL && stack.is(lubricationOil().getBucket())) { + if (!player.isCreative()) + player.setItemInHand(hand, Items.BUCKET.getDefaultInstance()); + + TFMGUtils.playSound(level, getBlockPos(), SoundEvents.BUCKET_EMPTY, SoundSource.BLOCKS); + constructionState = TransformerConstructionState.FINISHED; + if (level.getBlockEntity(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING))) instanceof LargeTransformerBlockEntity be) { + be.constructionState = constructionState; + } + onPlaced(); + return ItemInteractionResult.SUCCESS; + } + + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + } + + + public int voltageGeneration() { + + if (isMainPart) + return 0; + + int voltageGeneration = 0; + + + if (getLevelAccessor().getBlockEntity(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING).getOpposite())) instanceof LargeTransformerBlockEntity be) + if (be.getData().getId() != getData().getId()) + if (be.getData().getVoltage() != 0) + voltageGeneration = (int) Math.max(voltageGeneration, be.data.getVoltage() * turnRatio); + getData().getsOutsidePower = true; + + + if (voltageGeneration == 0) + getData().getsOutsidePower = false; + + return voltageGeneration; + } + + public IElectric getControlledBlock() { + Direction facing = getBlockState().getValue(HORIZONTAL_FACING); + if (level.getBlockEntity(getBlockPos().relative(facing)) instanceof LargeTransformerBlockEntity be) { + return be; + } + return null; + } + + @Override + protected void write(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { + super.write(compound, registries, clientPacket); + compound.putFloat("Ratio", turnRatio); + compound.putString("State", constructionState.toString()); + } + + @Override + protected void read(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { + super.read(compound, registries, clientPacket); + turnRatio = compound.getFloat("Ratio"); + constructionState = Enum.valueOf(TransformerConstructionState.class, compound.getString("State")); + } + + @Override + public float resistance() { + if (!isMainPart) + return 0; + + Direction facing = getBlockState().getValue(HORIZONTAL_FACING); + if (level.getBlockEntity(getBlockPos().relative(facing)) instanceof IElectric be && be.getData().getId() != data.getId()) { + int count = getBlocksConnectedToNetworkCount(getControlledBlock().getData().getId()); + if (count != 0) + return Math.max(be.getNetworkResistance() * count, 0); + } + return 0; + } + + @Override + public void onNetworkChanged(int oldVoltage, int oldPower) { + super.onNetworkChanged(oldVoltage, oldPower); + + if (oldVoltage != getData().getVoltage() || oldPower != getPowerUsage()) { + updateInFront = true; + getOrCreateElectricNetwork().handleInsufficientPower(); + } + sendStuff(); + setChanged(); + } + + public int powerGeneration() { + + if (isMainPart) + return 0; + + if (level.getBlockEntity(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING).getOpposite())) instanceof LargeTransformerBlockEntity be && be.data.notEnoughPower) + return 0; + + int powerGeneration = 0; + + + if (getLevelAccessor().getBlockEntity(getBlockPos().relative(getBlockState().getValue(HORIZONTAL_FACING).getOpposite())) instanceof LargeTransformerBlockEntity be) + if (be.getData().getId() != getData().getId()) + if (be.getData().getVoltage() != 0) { + int maxPower = switch (constructionState) { + case FINISHED -> 100000; + case NEEDS_OIL -> 50000; + case NEEDS_STEEL -> 30000; + }; + powerGeneration = Math.max(powerGeneration, maxPower); + } + getData().getsOutsidePower = true; + + + if (powerGeneration == 0) + getData().getsOutsidePower = false; + + return powerGeneration; + } + + public void updateInFront() { + + if (level instanceof ServerLevel serverLevel) + CatnipServices.NETWORK.sendToClientsTrackingChunk(serverLevel, new ChunkPos(worldPosition), new UpdateInFrontPacket(BlockPos.of(getPos()))); + Direction facing = getBlockState().getValue(HORIZONTAL_FACING); + if (level.getBlockEntity(getBlockPos().relative(facing)) instanceof IElectric be && be.getData().getId() != data.getId()) { + be.updateNextTick(); + + } + sendStuff(); + setChanged(); + } + + + @Override + public void tick() { + super.tick(); + + if (updateInFront) { + updateInFront(); + updateInFront = false; + } + + } + + @Override + public int getMaxCurrent() { + return 500; + } + + @Override + public int getMaxVoltage() { + return 100000; + } + + @Override + public boolean makeMultimeterTooltip(List tooltip, boolean isPlayerSneaking) { + + String stateKey = switch (constructionState) { + case FINISHED -> "multimeter.large_transformer.oil_cooled"; + case NEEDS_OIL -> "multimeter.large_transformer.metal_cooled"; + case NEEDS_STEEL -> "multimeter.large_transformer.air_cooled"; + }; + + TFMGLang.translate(stateKey).color(0x69c9c5).forGoggles(tooltip); + TFMGTexts.Multimeter.transformerRatio(turnRatio); + + super.makeMultimeterTooltip(tooltip, isPlayerSneaking); + return true; + } + + + @Override + public boolean hasElectricitySlot(Direction direction) { + + return direction == Direction.UP; + + } + + enum TransformerConstructionState { + + FINISHED, + NEEDS_OIL, + NEEDS_STEEL + + + } +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeTransformerGenerator.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeTransformerGenerator.java new file mode 100644 index 00000000..64ddc9cf --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/large/LargeTransformerGenerator.java @@ -0,0 +1,55 @@ +package com.drmangotea.tfmg.content.electricity.network.transformer.large; + +import com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchBlock; +import com.simibubi.create.content.kinetics.base.HorizontalKineticBlock; +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.neoforged.neoforge.client.model.generators.ModelFile; + +import static com.simibubi.create.foundation.data.AssetLookup.partialBaseModel; + +public class LargeTransformerGenerator extends SpecialBlockStateGen { + + + @Override + protected int getXRotation(BlockState state) { + return 0; + } + + @Override + protected int getYRotation(BlockState state) { + if (state.getValue(LargeSwitchBlock.IS_MAIN_PART)) { + return switch (state.getValue(HorizontalKineticBlock.HORIZONTAL_FACING)) { + case NORTH -> 180; + case SOUTH -> 0; + case WEST -> 90; + case EAST -> 270; + case DOWN -> 90; + case UP -> 90; + }; + } else + return switch (state.getValue(HorizontalKineticBlock.HORIZONTAL_FACING)) { + case NORTH -> 0; + case SOUTH -> 180; + case WEST -> 270; + case EAST -> 90; + case DOWN -> 90; + case UP -> 90; + }; + } + + + @Override + public ModelFile getModel(DataGenContext ctx, RegistrateBlockstateProvider prov, + BlockState state) { + + + + return state.getValue(LargeTransformerBlock.UNFINISHED_MODEL) ? partialBaseModel(ctx, prov, "unfinished") + : partialBaseModel(ctx, prov); + } + +} diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/ElectromagneticCoilItem.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/ElectromagneticCoilItem.java similarity index 79% rename from src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/ElectromagneticCoilItem.java rename to src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/ElectromagneticCoilItem.java index 650362bf..32fe88a5 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/ElectromagneticCoilItem.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/ElectromagneticCoilItem.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.electricity.network.transformer; +package com.drmangotea.tfmg.content.electricity.network.transformer.small; import com.drmangotea.tfmg.base.lang.TFMGLang; @@ -22,8 +22,10 @@ public class ElectromagneticCoilItem extends Item { @Override @OnlyIn(Dist.CLIENT) public void appendHoverText(ItemStack stack, TooltipContext context, List tooltip, TooltipFlag flag) { - tooltip.add(TFMGLang.translateDirect("tooltip.coils", stack.get(TFMGDataComponents.COIL_TURNS)==null?0:stack.get(TFMGDataComponents.COIL_TURNS)) - .withStyle(ChatFormatting.GREEN) + String text = TFMGLang.translateDirect("tooltip.coils").getString(); + + tooltip.add(TFMGLang.text(text+stack.getOrDefault(TFMGDataComponents.COIL_TURNS,0)).component().withStyle(ChatFormatting.GREEN) + ); super.appendHoverText(stack, context, tooltip, flag); } diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/TransformerBlock.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/TransformerBlock.java similarity index 99% rename from src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/TransformerBlock.java rename to src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/TransformerBlock.java index 3b883ecc..bb11d81d 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/TransformerBlock.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/TransformerBlock.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.electricity.network.transformer; +package com.drmangotea.tfmg.content.electricity.network.transformer.small; import com.drmangotea.tfmg.base.blocks.TFMGHorizontalDirectionalBlock; import com.drmangotea.tfmg.base.TFMGShapes; diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/TransformerBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/TransformerBlockEntity.java similarity index 96% rename from src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/TransformerBlockEntity.java rename to src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/TransformerBlockEntity.java index 64137d3f..5d5a87c4 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/TransformerBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/TransformerBlockEntity.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.electricity.network.transformer; +package com.drmangotea.tfmg.content.electricity.network.transformer.small; import com.drmangotea.tfmg.base.TFMGUtils; import com.drmangotea.tfmg.base.lang.TFMGTexts; @@ -141,8 +141,11 @@ public class TransformerBlockEntity extends VoltageAlteringBlockEntity { public float resistance() { Direction facing = getBlockState().getValue(FACING).getCounterClockWise(); if (level.getBlockEntity(getBlockPos().relative(facing)) instanceof IElectric be && be.getData().getId() != data.getId()) { - if (be.hasElectricitySlot(facing.getOpposite())) - return Math.max(be.getNetworkResistance(), 0); + if (be.hasElectricitySlot(facing.getOpposite())) { + int count = getBlocksConnectedToNetworkCount(getControlledBlock().getData().getId()); + if(count!=0) + return Math.max(be.getNetworkResistance()*count, 0); + } } return 0; } diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/TransformerRenderer.java b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/TransformerRenderer.java similarity index 99% rename from src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/TransformerRenderer.java rename to src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/TransformerRenderer.java index f9de7fef..0bcac6ba 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/TransformerRenderer.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/network/transformer/small/TransformerRenderer.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.electricity.network.transformer; +package com.drmangotea.tfmg.content.electricity.network.transformer.small; import com.drmangotea.tfmg.registry.TFMGPartialModels; import com.mojang.blaze3d.vertex.PoseStack; diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/electric_pump/ElectricPumpBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/electric_pump/ElectricPumpBlockEntity.java index 70edfb96..e6f2341a 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/electric_pump/ElectricPumpBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/electric_pump/ElectricPumpBlockEntity.java @@ -247,12 +247,7 @@ public class ElectricPumpBlockEntity extends PumpBlockEntity implements IElectri } - @Override - protected void write(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { - super.write(compound,registries , clientPacket); - writeElectricity(compound,clientPacket); - } @Override protected void read(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/polarizer/PolarizerBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/polarizer/PolarizerBlockEntity.java index 0f4e0a8e..bfd87251 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/polarizer/PolarizerBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/polarizer/PolarizerBlockEntity.java @@ -111,10 +111,6 @@ public class PolarizerBlockEntity extends ElectricBlockEntity implements IHaveGo return true; } - @Override - public boolean canBeInGroups() { - return false; - } @Override public void tick() { diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/resistor/ResistorBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/resistor/ResistorBlockEntity.java index d5fa98e5..d7a14a77 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/resistor/ResistorBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/utilities/resistor/ResistorBlockEntity.java @@ -25,10 +25,7 @@ public class ResistorBlockEntity extends ElectricBlockEntity { return direction == getBlockState().getValue(FACING).getOpposite(); } - @Override - public boolean canBeInGroups() { - return true; - } + @Override public float resistance() { diff --git a/src/main/java/com/drmangotea/tfmg/content/machinery/misc/winding_machine/SpoolItem.java b/src/main/java/com/drmangotea/tfmg/content/machinery/misc/winding_machine/SpoolItem.java index fa748ace..39ff812a 100644 --- a/src/main/java/com/drmangotea/tfmg/content/machinery/misc/winding_machine/SpoolItem.java +++ b/src/main/java/com/drmangotea/tfmg/content/machinery/misc/winding_machine/SpoolItem.java @@ -9,7 +9,6 @@ import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnection import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorBlockEntity; import com.drmangotea.tfmg.registry.TFMGDataComponents; import com.drmangotea.tfmg.registry.TFMGItems; - import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -28,7 +27,6 @@ import net.minecraft.world.level.Level; import net.neoforged.api.distmarker.Dist; import net.neoforged.api.distmarker.OnlyIn; - import java.util.List; import java.util.Objects; @@ -48,7 +46,7 @@ public class SpoolItem extends Item { @Override public void onCraftedBy(ItemStack stack, Level p_41448_, Player p_41449_) { - stack.set(TFMGDataComponents.SPOOL_AMOUNT,1000); + stack.set(TFMGDataComponents.SPOOL_AMOUNT, 1000); super.onCraftedBy(stack, p_41448_, p_41449_); } @@ -57,8 +55,8 @@ public class SpoolItem extends Item { @Override public InteractionResultHolder use(Level level, Player player, InteractionHand hand) { ItemStack stack = player.getItemInHand(hand); - if (player.isCrouching() && stack.getOrDefault(TFMGDataComponents.POSITION,0f).longValue() != 0f) { - if (level.getBlockEntity(BlockPos.of(stack.getOrDefault(TFMGDataComponents.POSITION,0f).longValue())) instanceof CableConnectorBlockEntity be) + if (player.isCrouching() && stack.getOrDefault(TFMGDataComponents.POSITION, 0f).longValue() != 0f) { + if (level.getBlockEntity(BlockPos.of(stack.getOrDefault(TFMGDataComponents.POSITION, 0f).longValue())) instanceof CableConnectorBlockEntity be) be.player = null; stack.set(TFMGDataComponents.POSITION, 0l); stack.remove(TFMGDataComponents.POSITION); @@ -79,15 +77,16 @@ public class SpoolItem extends Item { @OnlyIn(Dist.CLIENT) public void appendHoverText(ItemStack stack, TooltipContext context, List tooltip, TooltipFlag flag) { + String text = TFMGLang.translateDirect("tooltip.coils").getString(); + tooltip.add(TFMGLang.text(text + stack.getOrDefault(TFMGDataComponents.SPOOL_AMOUNT, 0)).component().withStyle(ChatFormatting.GREEN) - tooltip.add(TFMGLang.translateDirect("tooltip.coils", stack.get(TFMGDataComponents.SPOOL_AMOUNT)==null?0:stack.get(TFMGDataComponents.SPOOL_AMOUNT)) - .withStyle(ChatFormatting.GREEN) ); - if(stack.get(TFMGDataComponents.POSITION)==null) + + if (stack.get(TFMGDataComponents.POSITION) == null) return; BlockPos pos = BlockPos.of(stack.get(TFMGDataComponents.POSITION)); - if(pos.asLong()!=0) + if (pos.asLong() != 0) tooltip.add(TFMGLang.text(pos.getX() + " " + pos.getY() + " " + pos.getZ()).component() .withStyle(ChatFormatting.AQUA) ); @@ -102,9 +101,9 @@ public class SpoolItem extends Item { Player player = context.getPlayer(); ItemStack stack = context.getItemInHand(); - if(level.getBlockEntity(pos) instanceof WindingMachineBlockEntity be){ + if (level.getBlockEntity(pos) instanceof WindingMachineBlockEntity be) { ItemStack oldSpool = ItemStack.EMPTY; - if(!be.spool.isEmpty()){ + if (!be.spool.isEmpty()) { oldSpool = be.spool; } be.spool = context.getItemInHand(); @@ -115,12 +114,12 @@ public class SpoolItem extends Item { return InteractionResult.SUCCESS; } - if(stack.get(TFMGDataComponents.SPOOL_AMOUNT)==null) + if (stack.get(TFMGDataComponents.SPOOL_AMOUNT) == null) return InteractionResult.PASS; - if(level.isClientSide) + if (level.isClientSide) return InteractionResult.SUCCESS; - if(Objects.equals(cableTypeKey, TFMG.asResource("empty"))) + if (Objects.equals(cableTypeKey, TFMG.asResource("empty"))) return InteractionResult.PASS; Direction direction = level.getBlockState(pos).getValue(FACING); for (int i = 0; i < 64; i++) { @@ -131,113 +130,109 @@ public class SpoolItem extends Item { } - if(level.getBlockEntity(pos) instanceof CableConnectorBlockEntity be){ + if (level.getBlockEntity(pos) instanceof CableConnectorBlockEntity be) { + if (stack.get(TFMGDataComponents.POSITION) != null) { + BlockPos posToConnect = BlockPos.of(stack.get(TFMGDataComponents.POSITION)); + if (posToConnect.equals(pos)) { + stack.set(TFMGDataComponents.POSITION, 0l); + if (level.isClientSide) + player.displayClientMessage(TFMGLang.translateDirect("wires.cant_connect_itself") + .withStyle(ChatFormatting.YELLOW), true); + be.player = null; + be.sendData(); + be.setChanged(); + return InteractionResult.SUCCESS; + } + for (int i = 0; i < 64; i++) { + if (level.getBlockEntity(posToConnect.relative(direction)) instanceof CableConnectorBlockEntity) { + posToConnect = posToConnect.relative(direction); - if(stack.get(TFMGDataComponents.POSITION)!=null){ - BlockPos posToConnect = BlockPos.of(stack.get(TFMGDataComponents.POSITION)); - if(posToConnect.equals(pos)){ - stack.set(TFMGDataComponents.POSITION,0l); - if (level.isClientSide) - player.displayClientMessage(TFMGLang.translateDirect("wires.cant_connect_itself") - .withStyle(ChatFormatting.YELLOW), true); - be.player = null; - be.sendData(); - be.setChanged(); - return InteractionResult.SUCCESS; - } - for (int i = 0; i < 64; i++) { - if (level.getBlockEntity(posToConnect.relative(direction)) instanceof CableConnectorBlockEntity) { - posToConnect = posToConnect.relative(direction); + } else break; - } else break; + } + if (level.getBlockEntity(posToConnect) instanceof CableConnectorBlockEntity otherBE) { + //CableConnectorBlockEntity connectedBe1 = pos.asLong()>posToConnect.asLong() ? otherBE : be; + //CableConnectorBlockEntity connectedBe2= pos.asLong()>posToConnect.asLong() ? be : otherBE; + CableType cableType = TFMGUtils.getCableType(cableTypeKey); - } - if(level.getBlockEntity(posToConnect) instanceof CableConnectorBlockEntity otherBE) { - //CableConnectorBlockEntity connectedBe1 = pos.asLong()>posToConnect.asLong() ? otherBE : be; - //CableConnectorBlockEntity connectedBe2= pos.asLong()>posToConnect.asLong() ? be : otherBE; - CableType cableType = TFMGUtils.getCableType(cableTypeKey); + CableConnection connection1 = new CableConnection(be.getCablePosition(), otherBE.getCablePosition(), otherBE.getBlockPos(), cableType, true); + CableConnection connection2 = new CableConnection(otherBE.getCablePosition(), be.getCablePosition(), be.getBlockPos(), cableType, false); - CableConnection connection1 = new CableConnection(be.getCablePosition(), otherBE.getCablePosition(), otherBE.getBlockPos(),cableType,true); - CableConnection connection2 = new CableConnection(otherBE.getCablePosition(), be.getCablePosition(), be.getBlockPos(),cableType,false); - - float wireCost = (connection1.getLength()/8); + float wireCost = (connection1.getLength() / 8); - if(stack.get(TFMGDataComponents.SPOOL_AMOUNT) 0 && inventory.getItem(0).getOrDefault(TFMGDataComponents.COIL_TURNS, defaultCoilTurns) < turnPercentage.getValue() * 10) { + if ((inventory.getItem(0).is(TFMGItems.ELECTROMAGNETIC_COIL.get())||inventory.getItem(0).is(TFMGBlocks.LARGE_COIL.get().asItem())) && spool.is(TFMGItems.COPPER_SPOOL.get()) && spool.getOrDefault(TFMGDataComponents.SPOOL_AMOUNT, defaultSpoolAmount) > 0 && inventory.getItem(0).getOrDefault(TFMGDataComponents.COIL_TURNS, defaultCoilTurns) < turnPercentage.getValue() * 10) { if(inventory.getItem(0).getOrDefault(TFMGDataComponents.COIL_TURNS, defaultCoilTurns) < turnPercentage.getValue() * 10){ spool.set(TFMGDataComponents.SPOOL_AMOUNT, spool.getOrDefault(TFMGDataComponents.SPOOL_AMOUNT, defaultSpoolAmount) - 1); inventory.getItem(0).set(TFMGDataComponents.COIL_TURNS, inventory.getItem(0).getOrDefault(TFMGDataComponents.COIL_TURNS, defaultCoilTurns) + 1); diff --git a/src/main/java/com/drmangotea/tfmg/content/machinery/vat/electrode_holder/ElectrodeHolderBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/machinery/vat/electrode_holder/ElectrodeHolderBlockEntity.java index 0388288d..703dd703 100644 --- a/src/main/java/com/drmangotea/tfmg/content/machinery/vat/electrode_holder/ElectrodeHolderBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/content/machinery/vat/electrode_holder/ElectrodeHolderBlockEntity.java @@ -29,12 +29,20 @@ import java.util.List; public class ElectrodeHolderBlockEntity extends ElectricBlockEntity implements IVatMachine { Electrode electrode = TFMGUtils.getElectrode(TFMG.asResource("none")); - boolean isTallEnough = true; public ElectrodeHolderBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { super(type, pos, state); } + @Override + public int getMaxVoltage() { + return 20000; + } + + @Override + public int getMaxCurrent() { + return 400; + } @Override public boolean hasElectricitySlot(Direction direction) { @@ -86,10 +94,7 @@ public class ElectrodeHolderBlockEntity extends ElectricBlockEntity implements I return this.electrode.getResistance(); } - @Override - public boolean canBeInGroups() { - return true; - } + public boolean setElectrode(Electrode electrode, boolean simulate) { if (electrode != null) { diff --git a/src/main/java/com/drmangotea/tfmg/datagen/recipes/TFMGRecipeProvider.java b/src/main/java/com/drmangotea/tfmg/datagen/recipes/TFMGRecipeProvider.java index 69587a43..70d14c44 100644 --- a/src/main/java/com/drmangotea/tfmg/datagen/recipes/TFMGRecipeProvider.java +++ b/src/main/java/com/drmangotea/tfmg/datagen/recipes/TFMGRecipeProvider.java @@ -541,6 +541,11 @@ public class TFMGRecipeProvider extends RecipeProvider { stack.set(TFMGDataComponents.COIL_TURNS,100); return stack; } + public static ItemStack largeCoil100Turns(){ + ItemStack stack = TFMGBlocks.LARGE_COIL.asStack(); + stack.set(TFMGDataComponents.COIL_TURNS,100); + return stack; + } public static ItemStack turbineBlade(){ ItemStack stack = TFMGItems.TURBINE_BLADE.asStack(); diff --git a/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/TFMGStandardRecipeGen.java b/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/TFMGStandardRecipeGen.java index e7ba96a2..b2d06a51 100644 --- a/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/TFMGStandardRecipeGen.java +++ b/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/TFMGStandardRecipeGen.java @@ -173,6 +173,14 @@ public class TFMGStandardRecipeGen extends TFMGRecipeProvider { .pattern("CPW") .pattern("MQK")), + LAMINATED_MAGNETIC_ALLOY_BLOCK = create(TFMGBlocks.LAMINATED_MAGNETIC_ALLOY_BLOCK) + .unlockedBy(TFMGItems.MAGNETIC_ALLOY_INGOT::get) + .viaShaped(b -> b + .define('C', TFMGItems.MAGNETIC_ALLOY_SHEET.get()) + .pattern("CCC") + .pattern("CCC") + .pattern("CCC")), + //STEEL_HELMET = create(TFMGItems.STEEL_HELMET) // .unlockedBy(TFMGItems.STEEL_INGOT::get) // .viaShaped(b -> b @@ -762,6 +770,21 @@ public class TFMGStandardRecipeGen extends TFMGRecipeProvider { .pattern("LCL") .pattern("RPR")), + + LARGE_SWITCH = create(TFMGBlocks.LARGE_SWITCH) + .unlockedBy(TFMGBlocks.CABLE_CONNECTOR::get) + .viaShaped(b -> b + .define('B', brassSheet()) + .define('R', rebar()) + .define('W', copperWire()) + .define('S', TFMGBlocks.STEEL_CABLE_HUB) + .define('M', steelMechanism()) + .define('I', TFMGBlocks.CABLE_CONNECTOR) + .define('P', TFMGBlocks.ELECTRIC_POST) + .pattern("WRB") + .pattern("SMP") + .pattern("III")), + // FUSE_BLOCK = create(TFMGBlocks.FUSE_BLOCK) // .unlockedBy(TFMGItems.COPPER_WIRE::get) // .viaShaped(b -> b @@ -1215,7 +1238,7 @@ public class TFMGStandardRecipeGen extends TFMGRecipeProvider { .unlockedBy(TFMGBlocks.STEEL_CASING::get) .viaShaped(b -> b .define('C', steelCasing()) - .define('M', magneticIngot()) + .define('M', TFMGItems.MAGNETIC_ALLOY_SHEET) .define('N', nickelSheet()) .define('W', copperWire()) .pattern("MMM") diff --git a/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/create/TFMGPressingRecipeGen.java b/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/create/TFMGPressingRecipeGen.java index 1b77cf85..ee9c39ed 100644 --- a/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/create/TFMGPressingRecipeGen.java +++ b/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/create/TFMGPressingRecipeGen.java @@ -1,6 +1,7 @@ package com.drmangotea.tfmg.datagen.recipes.values.create; import com.drmangotea.tfmg.TFMG; +import com.drmangotea.tfmg.registry.TFMGItems; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.api.data.recipe.PressingRecipeGen; import net.minecraft.core.HolderLookup; @@ -26,6 +27,9 @@ public class TFMGPressingRecipeGen extends PressingRecipeGen { NICKEL_SHEET = create(TFMG.asResource("nickel_ingot"), b -> b.require(nickelIngot()) .output(nickelSheetTFMG())), + MAGNETIC_ALLOY_SHEET = create(TFMG.asResource("magnetic_alloy_ingot"), b -> b.require(TFMGItems.MAGNETIC_ALLOY_INGOT) + .output(TFMGItems.MAGNETIC_ALLOY_SHEET)), + SYNTHETIC_LEATHER = create(TFMG.asResource("synthetic_leather"), b -> b .require(rubber()) .output(syntheticLeather())); diff --git a/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/tfmg/TFMGWindingRecipeGen.java b/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/tfmg/TFMGWindingRecipeGen.java index f9de24cc..990ded24 100644 --- a/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/tfmg/TFMGWindingRecipeGen.java +++ b/src/main/java/com/drmangotea/tfmg/datagen/recipes/values/tfmg/TFMGWindingRecipeGen.java @@ -2,36 +2,40 @@ package com.drmangotea.tfmg.datagen.recipes.values.tfmg; import com.drmangotea.tfmg.TFMG; import com.drmangotea.tfmg.datagen.recipes.builder.WindingRecipeGen; +import com.drmangotea.tfmg.registry.TFMGBlocks; import com.drmangotea.tfmg.registry.TFMGItems; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; import java.util.concurrent.CompletableFuture; -import static com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider.I.coil100Turns; -import static com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider.I.resistor10Ohms; +import static com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider.I.*; public class TFMGWindingRecipeGen extends WindingRecipeGen { - GeneratedRecipe + GeneratedRecipe - ELECTROMAGNETIC_COIL = create("electromagnetic_coil", b ->b - .require(TFMGItems.UNFINISHED_ELECTROMAGNETIC_COIL) - .require(TFMGItems.COPPER_SPOOL) - .output(coil100Turns()) - .duration(100)), - RESISTOR = create("resistor", b ->b - .require(TFMGItems.UNFINISHED_RESISTOR) - .require(TFMGItems.CONSTANTAN_SPOOL) - .output(resistor10Ohms()) - .duration(50)) -; - public TFMGWindingRecipeGen(PackOutput generator, CompletableFuture registries) { - super(generator, registries, TFMG.MOD_ID); - } + ELECTROMAGNETIC_COIL = create("electromagnetic_coil", b -> b + .require(TFMGItems.UNFINISHED_ELECTROMAGNETIC_COIL) + .require(TFMGItems.COPPER_SPOOL) + .output(coil100Turns()) + .duration(100)), + LARGE_COIL = create("large_coil", b -> b + .require(TFMGBlocks.LAMINATED_MAGNETIC_ALLOY_BLOCK) + .require(TFMGItems.COPPER_SPOOL) + .output(largeCoil100Turns()) + .duration(100)), + RESISTOR = create("resistor", b -> b + .require(TFMGItems.UNFINISHED_RESISTOR) + .require(TFMGItems.CONSTANTAN_SPOOL) + .output(resistor10Ohms()) + .duration(50)); + public TFMGWindingRecipeGen(PackOutput generator, CompletableFuture registries) { + super(generator, registries, TFMG.MOD_ID); + } } \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGBlockEntities.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGBlockEntities.java index 2bf03a17..b34bfae3 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGBlockEntities.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGBlockEntities.java @@ -11,8 +11,8 @@ import com.drmangotea.tfmg.content.decoration.tanks.TFMGFluidTankBlockEntity; import com.drmangotea.tfmg.content.decoration.tanks.TFMGFluidTankRenderer; import com.drmangotea.tfmg.content.decoration.tanks.steel.SteelFluidTankRenderer; import com.drmangotea.tfmg.content.decoration.tanks.steel.SteelTankBlockEntity; -import com.drmangotea.tfmg.content.electricity.base.ElectricBlockEntity; import com.drmangotea.tfmg.content.electricity.base.VoltageAlteringBlockEntity; +import com.drmangotea.tfmg.content.electricity.connection.CableHubBlockEntity; import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorBlockEntity; import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorRenderer; import com.drmangotea.tfmg.content.electricity.connection.copycat_cable.CopycatCableBlockEntity; @@ -33,6 +33,11 @@ import com.drmangotea.tfmg.content.electricity.lights.variants.CircularLightRend import com.drmangotea.tfmg.content.electricity.lights.variants.ModernLightRenderer; import com.drmangotea.tfmg.content.electricity.measurement.VoltMeterBlockEntity; import com.drmangotea.tfmg.content.electricity.measurement.VoltMeterRenderer; +import com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchBlockEntity; +import com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchRenderer; +import com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchVisual; +import com.drmangotea.tfmg.content.electricity.network.transformer.large.LargeCoilBlockEntity; +import com.drmangotea.tfmg.content.electricity.network.transformer.large.LargeTransformerBlockEntity; import com.drmangotea.tfmg.content.electricity.storage.AccumulatorBlockEntity; import com.drmangotea.tfmg.content.electricity.utilities.converter.ConverterBlockEntity; import com.drmangotea.tfmg.content.electricity.utilities.electric_motor.ElectricMotorBlockEntity; @@ -47,8 +52,8 @@ import com.drmangotea.tfmg.content.electricity.utilities.segmented_display.Segme import com.drmangotea.tfmg.content.electricity.utilities.segmented_display.SegmentedDisplayRenderer; import com.drmangotea.tfmg.content.electricity.utilities.traffic_light.TrafficLightBlockEntity; import com.drmangotea.tfmg.content.electricity.utilities.traffic_light.TrafficLightRenderer; -import com.drmangotea.tfmg.content.electricity.network.transformer.TransformerBlockEntity; -import com.drmangotea.tfmg.content.electricity.network.transformer.TransformerRenderer; +import com.drmangotea.tfmg.content.electricity.network.transformer.small.TransformerBlockEntity; +import com.drmangotea.tfmg.content.electricity.network.transformer.small.TransformerRenderer; import com.drmangotea.tfmg.content.electricity.utilities.voltage_observer.VoltageObserverBlockEntity; import com.drmangotea.tfmg.content.engines.base.EngineRenderer; import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlockEntity; @@ -137,6 +142,16 @@ public class TFMGBlockEntities { .blockEntity("electrical_switch", ElectricSwitchBlockEntity::new) .validBlocks(TFMGBlocks.ELECTRICAL_SWITCH) .register(); + public static final BlockEntityEntry LARGE_SWITCH = REGISTRATE + .blockEntity("large_switch", LargeSwitchBlockEntity::new) + .visual(() -> LargeSwitchVisual::new) + .validBlocks(TFMGBlocks.LARGE_SWITCH) + .renderer(() -> LargeSwitchRenderer::new) + .register(); + public static final BlockEntityEntry LARGE_TRANSFORMER = REGISTRATE + .blockEntity("large_transformer", LargeTransformerBlockEntity::new) + .validBlocks(TFMGBlocks.LARGE_TRANSFORMER) + .register(); public static final BlockEntityEntry POLARIZER = REGISTRATE .blockEntity("polarizer", PolarizerBlockEntity::new) .validBlocks(TFMGBlocks.POLARIZER) @@ -265,6 +280,11 @@ public class TFMGBlockEntities { .validBlocks(TFMGBlocks.DIODE, TFMGBlocks.ENCASED_DIODE) .register(); + public static final BlockEntityEntry LARGE_COIL = REGISTRATE + .blockEntity("large_coil", LargeCoilBlockEntity::new) + .validBlocks(TFMGBlocks.LARGE_COIL) + .register(); + public static final BlockEntityEntry REGULAR_ENGINE = REGISTRATE .blockEntity("regular_engine", RegularEngineBlockEntity::new) @@ -487,8 +507,8 @@ public class TFMGBlockEntities { - public static final BlockEntityEntry CABLE_HUB = REGISTRATE - .blockEntity("cable_hub", ElectricBlockEntity::new) + public static final BlockEntityEntry CABLE_HUB = REGISTRATE + .blockEntity("cable_hub", CableHubBlockEntity::new) .validBlocks(TFMGBlocks.BRASS_CABLE_HUB, TFMGBlocks.COPPER_CABLE_HUB, TFMGBlocks.STEEL_CABLE_HUB, diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java index cff4428c..9480ba91 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java @@ -39,6 +39,9 @@ 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; import com.drmangotea.tfmg.content.electricity.measurement.VoltMeterBlock; +import com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchBlock; +import com.drmangotea.tfmg.content.electricity.network.large_switch.LargeSwitchGenerator; +import com.drmangotea.tfmg.content.electricity.network.transformer.large.*; import com.drmangotea.tfmg.content.electricity.storage.AccumulatorBlock; import com.drmangotea.tfmg.content.electricity.storage.AccumulatorItem; import com.drmangotea.tfmg.content.electricity.storage.CapacitorCTBehavior; @@ -57,7 +60,7 @@ import com.drmangotea.tfmg.content.electricity.utilities.resistor.ResistorBlockI import com.drmangotea.tfmg.content.electricity.utilities.segmented_display.SegmentedDisplayBlock; import com.drmangotea.tfmg.content.electricity.utilities.segmented_display.SegmentedDisplayCTBehavior; import com.drmangotea.tfmg.content.electricity.utilities.traffic_light.TrafficLightBlock; -import com.drmangotea.tfmg.content.electricity.network.transformer.TransformerBlock; +import com.drmangotea.tfmg.content.electricity.network.transformer.small.TransformerBlock; import com.drmangotea.tfmg.content.electricity.utilities.voltage_observer.VoltageObserverBlock; import com.drmangotea.tfmg.content.electricity.utilities.voltage_observer.VoltageObserverGenerator; import com.drmangotea.tfmg.content.engines.base.EngineCTBehavior; @@ -323,7 +326,7 @@ public class TFMGBlocks { .tag(TFMGBlockTags.INDUSTRIAL_PIPE.tag) .recipe((c, p) -> p.stonecutting(DataIngredient.tag(CommonMetal.STEEL.ingots), RecipeCategory.BUILDING_BLOCKS, c, 8)) .blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov))) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry CONCRETE_ENCASED_INDUSTRIAL_PIPE = REGISTRATE.block("concrete_encased_industrial_pipe", Block::new) .initialProperties(SharedProperties::softMetal) @@ -369,7 +372,7 @@ public class TFMGBlocks { .tag(TFMGBlockTags.PUMPJACK_SMALL_PART.tag) .recipe((c, p) -> p.stonecutting(DataIngredient.tag(CommonMetal.STEEL.storageBlocks.items()), RecipeCategory.DECORATIONS, c, 2)) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry PUMPJACK_HAMMER_HEAD = REGISTRATE.block("pumpjack_hammer_head", PumpjackHammerHeadBlock::new) .initialProperties(SharedProperties::softMetal) @@ -377,7 +380,7 @@ public class TFMGBlocks { .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(BlockStateGen.horizontalBlockProvider(false)) .tag(TFMGBlockTags.PUMPJACK_HEAD.tag) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry PUMPJACK_HAMMER_CONNECTOR = REGISTRATE.block("pumpjack_hammer_connector", PumpjackHammerConnectorBlock::new) @@ -386,7 +389,7 @@ public class TFMGBlocks { .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(BlockStateGen.horizontalBlockProvider(false)) .tag(TFMGBlockTags.PUMPJACK_CONNECTOR.tag) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry LARGE_PUMPJACK_HAMMER_PART = REGISTRATE.block("large_pumpjack_hammer_part", LargePumpjackHammerPartBlock::new) .initialProperties(SharedProperties::softMetal) @@ -395,7 +398,7 @@ public class TFMGBlocks { .tag(TFMGBlockTags.PUMPJACK_PART.tag) .recipe((c, p) -> p.stonecutting(DataIngredient.tag(CommonMetal.STEEL.storageBlocks.items()), RecipeCategory.DECORATIONS, c, 2)) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry LARGE_PUMPJACK_HAMMER_HEAD = REGISTRATE.block("large_pumpjack_hammer_head", LargePumpjackHammerHeadBlock::new) @@ -403,21 +406,21 @@ public class TFMGBlocks { .transform(pickaxeOnly()) .blockstate(BlockStateGen.horizontalBlockProvider(false)) .tag(TFMGBlockTags.PUMPJACK_HEAD.tag) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry LARGE_PUMPJACK_HAMMER_CONNECTOR = REGISTRATE.block("large_pumpjack_hammer_connector", LargePumpjackHammerConnectorBlock::new) .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .blockstate(BlockStateGen.horizontalBlockProvider(false)) .tag(TFMGBlockTags.PUMPJACK_CONNECTOR.tag) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry PUMPJACK_BASE = REGISTRATE.block("pumpjack_base", PumpjackBaseBlock::new) .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov))) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry OIL_DEPOSIT = REGISTRATE.block("oil_deposit", Block::new) .initialProperties(() -> Blocks.BEDROCK) @@ -431,7 +434,7 @@ public class TFMGBlocks { .tag(BlockTags.INFINIBURN_OVERWORLD) .tag(BlockTags.FEATURES_CANNOT_REPLACE) .tag(AllTags.AllBlockTags.NON_MOVABLE.tag) - .simpleItem() + .simpleItem() .register(); //------------------VAT_MACHINES------------------// @SuppressWarnings("'addLayer(java.util.function.Supplier>)' is deprecated and marked for removal ") @@ -511,9 +514,9 @@ public class TFMGBlocks { }) .tag(BlockTags.NEEDS_STONE_TOOL) .transform(tagBlockAndItem(Map.of( - Tags.Blocks.ORES, Tags.Items.ORES, - CommonMetal.LEAD.ores.blocks(), CommonMetal.LEAD.ores.items(), - Tags.Blocks.ORES_IN_GROUND_STONE, Tags.Items.ORES_IN_GROUND_STONE + Tags.Blocks.ORES, Tags.Items.ORES, + CommonMetal.LEAD.ores.blocks(), CommonMetal.LEAD.ores.items(), + Tags.Blocks.ORES_IN_GROUND_STONE, Tags.Items.ORES_IN_GROUND_STONE ))) .build() .register(); @@ -635,12 +638,12 @@ public class TFMGBlocks { public static final BlockEntry SULFUR = REGISTRATE.block("sulfur", Block::new) .initialProperties(() -> Blocks.CALCITE) .transform(pickaxeOnly()) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry LIGNITE = REGISTRATE.block("lignite", Block::new) .initialProperties(() -> Blocks.CALCITE) .transform(pickaxeOnly()) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry FIRECLAY = REGISTRATE.block("fireclay", Block::new) .initialProperties(() -> Blocks.CLAY) @@ -793,7 +796,7 @@ public class TFMGBlocks { .transform(pickaxeOnly()) .tag(TFMGBlockTags.BLAST_FURNACE_WALL.tag) .tag(BlockTags.NEEDS_STONE_TOOL) - .simpleItem() + .simpleItem() .register(); public static final BlockEntry REINFORCED_FIREPROOF_BRICKS = REGISTRATE.block("reinforced_fireproof_bricks", Block::new) @@ -968,14 +971,14 @@ public class TFMGBlocks { .blockstate((c, p) -> p.simpleBlock(c.get(), AssetLookup.partialBaseModel(c, p))) .register(); public static final BlockEntry BRASS_CABLE_HUB = - REGISTRATE.block("brass_cable_hub", CableHubBlock::new) + REGISTRATE.block("brass_cable_hub", p -> new CableHubBlock(p, 50)) .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .item() .build() .register(); public static final BlockEntry COPPER_CABLE_HUB = - REGISTRATE.block("copper_cable_hub", CableHubBlock::new) + REGISTRATE.block("copper_cable_hub", p -> new CableHubBlock(p, 16)) .initialProperties(() -> Blocks.COPPER_BLOCK) .properties(p -> p.sound(SoundType.COPPER)) .transform(pickaxeOnly()) @@ -983,28 +986,28 @@ public class TFMGBlocks { .build() .register(); public static final BlockEntry STEEL_CABLE_HUB = - REGISTRATE.block("steel_cable_hub", CableHubBlock::new) + REGISTRATE.block("steel_cable_hub", p -> new CableHubBlock(p, 250)) .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .item() .build() .register(); public static final BlockEntry ALUMINUM_CABLE_HUB = - REGISTRATE.block("aluminum_cable_hub", CableHubBlock::new) + REGISTRATE.block("aluminum_cable_hub", p -> new CableHubBlock(p, 80)) .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .item() .build() .register(); public static final BlockEntry STEEL_CASING_CABLE_HUB = - REGISTRATE.block("steel_casing_cable_hub", CableHubBlock::new) + REGISTRATE.block("steel_casing_cable_hub", p -> new CableHubBlock(p, 100)) .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .item() .build() .register(); public static final BlockEntry HEAVY_CABLE_HUB = - REGISTRATE.block("heavy_cable_hub", CableHubBlock::new) + REGISTRATE.block("heavy_cable_hub", p -> new CableHubBlock(p, 100)) .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .item() @@ -1182,6 +1185,17 @@ public class TFMGBlocks { .item() .transform(customItemModel()) .register(); + public static final BlockEntry LARGE_SWITCH = + REGISTRATE.block("large_switch", LargeSwitchBlock::new) + .initialProperties(SharedProperties::softMetal) + .blockstate(new LargeSwitchGenerator()::generate) + .properties(BlockBehaviour.Properties::noOcclusion) + .tag(AllTags.AllBlockTags.NON_MOVABLE.tag) + .transform(pickaxeOnly()) + .addLayer(() -> RenderType::cutoutMipped) + .item() + .transform(customItemModel()) + .register(); public static final BlockEntry ENCASED_POTENTIOMETER = REGISTRATE.block("encased_potentiometer", EncasedPotentiometerBlock::new) .initialProperties(SharedProperties::softMetal) @@ -1288,6 +1302,16 @@ public class TFMGBlocks { .transform(customItemModel()) .register(); + public static final BlockEntry LARGE_TRANSFORMER = + REGISTRATE.block("large_transformer", LargeTransformerBlock::new) + .initialProperties(SharedProperties::softMetal) + .blockstate(new LargeTransformerGenerator()::generate) + .properties(BlockBehaviour.Properties::noOcclusion) + .tag(AllTags.AllBlockTags.NON_MOVABLE.tag) + .transform(pickaxeOnly()) + .addLayer(() -> RenderType::cutoutMipped) + .register(); + public static final BlockEntry CONVERTER = REGISTRATE.block("converter", ConverterBlock::new) @@ -1299,6 +1323,16 @@ public class TFMGBlocks { .transform(customItemModel()) .register(); + public static final BlockEntry LARGE_COIL = + REGISTRATE.block("large_coil", LargeCoilBlock::new) + .initialProperties(SharedProperties::softMetal) + .transform(pickaxeOnly()) + .blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov))) + .properties(BlockBehaviour.Properties::noOcclusion) + .item(LargeElectromagneticCoilItem::new) + .transform(customItemModel()) + .register(); + //public static final BlockEntry FUSE_BLOCK = // REGISTRATE.block("fuse_block", FuseBlock::new) // .initialProperties(SharedProperties::softMetal) @@ -1598,10 +1632,21 @@ public class TFMGBlocks { .lang("Block of Coal Coke") .register(); + public static final BlockEntry LAMINATED_MAGNETIC_ALLOY_BLOCK = REGISTRATE.block("laminated_magnetic_alloy_block", Block::new) + .initialProperties(SharedProperties::softMetal) + .properties(BlockBehaviour.Properties::requiresCorrectToolForDrops) + .transform(pickaxeOnly()) + .tag(BlockTags.BEACON_BASE_BLOCKS) + .blockstate(simpleCubeAll("laminated_magnetic_alloy_block")) + .tag(BlockTags.NEEDS_IRON_TOOL) + .item(CoalCokeBlockItem::new) + .build() + .register(); + public static final BlockEntry CEMENT = REGISTRATE.block("cement", p -> new ColoredFallingBlock(new ColorRGBA(-8356741), p)) .initialProperties(() -> Blocks.CLAY) .tag(BlockTags.MINEABLE_WITH_SHOVEL) - .simpleItem() + .simpleItem() .register(); //------------------DOOR------------------// diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGItems.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGItems.java index c5953532..f243833d 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGItems.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGItems.java @@ -10,7 +10,7 @@ import com.drmangotea.tfmg.base.debug.DebugCinderBlockItem; import com.drmangotea.tfmg.content.electricity.measurement.MultimeterItem; import com.drmangotea.tfmg.content.electricity.utilities.polarizer.MagnetItem; import com.drmangotea.tfmg.content.electricity.utilities.resistor.ResistorItem; -import com.drmangotea.tfmg.content.electricity.network.transformer.ElectromagneticCoilItem; +import com.drmangotea.tfmg.content.electricity.network.transformer.small.ElectromagneticCoilItem; import com.drmangotea.tfmg.content.engines.CylinderItem; import com.drmangotea.tfmg.content.engines.FluidContainingItem; import com.drmangotea.tfmg.content.engines.upgrades.TransmissionItem; @@ -129,9 +129,9 @@ public class TFMGItems { CONCRETE_MIXTURE = REGISTRATE.item("concrete_mixture", Item::new).register(), ASPHALT_MIXTURE = REGISTRATE.item("asphalt_mixture", Item::new).register(), MAGNETIC_ALLOY_INGOT = REGISTRATE.item("magnetic_alloy_ingot", Item::new).register(), + MAGNETIC_ALLOY_SHEET = REGISTRATE.item("magnetic_alloy_sheet", Item::new).register(), BAUXITE_POWDER = REGISTRATE.item("bauxite_powder", Item::new).register(), - - EMPTY_CIRCUIT_BOARD = REGISTRATE.item("empty_circuit_board", Item::new).register(), + EMPTY_CIRCUIT_BOARD = REGISTRATE.item("empty_circuit_board", Item::new).register(), COATED_CIRCUIT_BOARD = REGISTRATE.item("coated_circuit_board", Item::new).register(), ETCHED_CIRCUIT_BOARD = REGISTRATE.item("etched_circuit_board", Item::new).register(), CIRCUIT_BOARD = REGISTRATE.item("circuit_board", Item::new).register(), diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGPackets.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGPackets.java index 6d3e11a5..805fde82 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGPackets.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGPackets.java @@ -1,10 +1,7 @@ package com.drmangotea.tfmg.registry; -import com.drmangotea.tfmg.content.electricity.base.ConnectNeightborsPacket; -import com.drmangotea.tfmg.content.electricity.base.ConnectionPacket; -import com.drmangotea.tfmg.content.electricity.base.NetworkUpdatePacket; -import com.drmangotea.tfmg.content.electricity.base.UpdateInFrontPacket; +import com.drmangotea.tfmg.content.electricity.base.*; import com.drmangotea.tfmg.content.electricity.connection.cables.CablePlacePacket; import com.drmangotea.tfmg.content.electricity.configuration_wrench.ElectriciansWrenchPacket; import com.drmangotea.tfmg.content.engines.engine_controller.TransmissionRemovePacket; @@ -31,6 +28,7 @@ public enum TFMGPackets implements BasePacketPayload.PacketTypeProvider { QUAD_POTATO_CANNON(QuadPotatoCannonPacket.class, QuadPotatoCannonPacket.STREAM_CODEC), CONNECT_NEIGHBORS(ConnectNeightborsPacket.class, ConnectNeightborsPacket.STREAM_CODEC), NETWORK_UPDATE(NetworkUpdatePacket.class, NetworkUpdatePacket.STREAM_CODEC), + ELECTRICAL_BLOCK_FAIL(ElectricalBlockFailPacket.class, ElectricalBlockFailPacket.STREAM_CODEC), CONNECTION_PACKET(ConnectionPacket.class, ConnectionPacket.STREAM_CODEC), VAT_EVALUATION(VatEvaluationPacket.class, VatEvaluationPacket.STREAM_CODEC), COKE_OVEN_PACKET(CokeOvenPacket.class, CokeOvenPacket.STREAM_CODEC), diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGPartialModels.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGPartialModels.java index ee6a1a74..ab3e9dd0 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGPartialModels.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGPartialModels.java @@ -39,6 +39,9 @@ public class TFMGPartialModels { CAST_IRON_FLYWHEEL = block("cast_iron_flywheel/block"), LEAD_FLYWHEEL = block("lead_flywheel/block"), NICKEL_FLYWHEEL = block("nickel_flywheel/block"), + LARGE_SWITCH_SHAFT = block("large_switch/shaft"), + LARGE_SWITCH_BUFFER = block("large_switch/buffer"), + LARGE_SWITCH_ARM = block("large_switch/connector"), DISTILLATION_CONTROLLER_DIAL = block("steel_distillation_controller/dial"), PUMPJACK_CRANK = block("pumpjack_crank/crank"), TOWER_GAUGE = block("distillation_tower/gauge"), diff --git a/src/main/resources/assets/tfmg/lang/default/interface.json b/src/main/resources/assets/tfmg/lang/default/interface.json index 3d7545f4..ccccc4d3 100644 --- a/src/main/resources/assets/tfmg/lang/default/interface.json +++ b/src/main/resources/assets/tfmg/lang/default/interface.json @@ -56,7 +56,7 @@ "tfmg.goggles.machine_input.power_level": "Power Level: ", "tfmg.winding_machine.header": "Winding Machine", - "tfmg.goggles.winding_machine.turns": "Turns Left: %1$", + "tfmg.goggles.winding_machine.turns": "Turns Left: ", "tfmg.goggles.winding_machine.progress": "Progress: ", "tfmg.polarizer.header": "Polarizer", @@ -157,10 +157,15 @@ "tfmg.multimeter.power_generated": " Power Generated: %s", "tfmg.multimeter.power_percentage": " Grid Strength: ", "tfmg.multimeter.energy_usage": " Energy Usage: ", + "tfmg.multimeter.approaching_overvoltage": " Approaching Overvoltage ", + "tfmg.multimeter.approaching_overcurrent": " Approaching Overcurrent ", "tfmg.multimeter.energy_stored": " Energy Stored: ", "tfmg.multimeter.network.generation": "Network Power Generation: %s", "tfmg.multimeter.network.consumption": "Network Power Consumption: %s", "tfmg.multimeter.transformer_ratio": " Turn Ratio: ", + "tfmg.multimeter.large_transformer.air_cooled": " State: Air Cooled", + "tfmg.multimeter.large_transformer.metal_cooled": " State: Metal Heat Sink Cooled", + "tfmg.multimeter.large_transformer.oil_cooled": " State: Oil + Heat Sink Cooled", "tfmg.electricity.capacity": "Capacity: %s", "tfmg.electricity.charging_rate": "Charging Rate: %s", diff --git a/src/main/resources/assets/tfmg/lang/default/tooltips.json b/src/main/resources/assets/tfmg/lang/default/tooltips.json index 447588f4..1a804ffa 100644 --- a/src/main/resources/assets/tfmg/lang/default/tooltips.json +++ b/src/main/resources/assets/tfmg/lang/default/tooltips.json @@ -162,6 +162,10 @@ "block.tfmg.cable_connector.tooltip.condition1": "When 2 cable insulators are right clicked with a copper/aluminum/constantan spool", "block.tfmg.cable_connector.tooltip.behaviour1": "Created a connection between the 2 insulators transferring power between them", + "block.tfmg.large_coil.tooltip.summary": "Used for creating the Large Transformer", + "block.tfmg.large_coil.tooltip.condition1": "When 2 Large Coils are placed next to each other and right-clicked with a Laminated Magnetic Alloy Block", + "block.tfmg.large_coil.tooltip.behaviour1": "The Large Transformer is Created, to make it efficient, right-click it with a Block of Steel and a Lubrication Oil Bucket", + "block.tfmg.glass_cable_insulator.tooltip.summary": "Transfers power", "block.tfmg.glass_cable_insulator.tooltip.condition1": "When 2 cable insulators are right clicked with a copper/aluminum/constantan spool", "block.tfmg.glass_cable_insulator.tooltip.behaviour1": "Created a connection between the 2 insulators transferring power between them", diff --git a/src/main/resources/assets/tfmg/models/block/large_coil/block.json b/src/main/resources/assets/tfmg/models/block/large_coil/block.json new file mode 100644 index 00000000..e493a98e --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_coil/block.json @@ -0,0 +1,24 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "tfmg:block/large_coil_top", + "1": "tfmg:block/large_coil_side", + "particle": "tfmg:block/large_coil_top" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_coil/item.json b/src/main/resources/assets/tfmg/models/block/large_coil/item.json new file mode 100644 index 00000000..e493a98e --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_coil/item.json @@ -0,0 +1,24 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "tfmg:block/large_coil_top", + "1": "tfmg:block/large_coil_side", + "particle": "tfmg:block/large_coil_top" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_switch/block_complete.json b/src/main/resources/assets/tfmg/models/block/large_switch/block_complete.json new file mode 100644 index 00000000..278ac2fc --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_switch/block_complete.json @@ -0,0 +1,564 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "parent": "block/block", + "texture_size": [32, 32], + "textures": { + "1": "tfmg:block/large_switch", + "2": "tfmg:block/steel_truss", + "3": "tfmg:block/generator", + "4": "tfmg:block/heavy_machinery_casing", + "particle": "tfmg:block/steel_truss" + }, + "elements": [ + { + "from": [6, 2, 1], + "to": [10, 6, 31], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 2, 0]}, + "faces": { + "east": {"uv": [14, 0, 16, 15], "rotation": 90, "texture": "#1"}, + "south": {"uv": [12, 3, 14, 5], "texture": "#1"}, + "west": {"uv": [14, 0, 16, 15], "rotation": 90, "texture": "#1"}, + "up": {"uv": [14, 0, 16, 15], "texture": "#1"}, + "down": {"uv": [14, 0, 16, 15], "texture": "#1"} + } + }, + { + "from": [5, 1, 2], + "to": [11, 7, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 2]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 4], + "to": [11, 7, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 4]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 6], + "to": [11, 7, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 6]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 8], + "to": [11, 7, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 8]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 10], + "to": [11, 7, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 10]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 12], + "to": [11, 7, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 12]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 14], + "to": [11, 7, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 14]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 16], + "to": [11, 7, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 16]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 18], + "to": [11, 7, 19], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 18]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 20], + "to": [11, 7, 21], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 20]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 22], + "to": [11, 7, 23], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 22]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 24], + "to": [11, 7, 25], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 24]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 26], + "to": [11, 7, 27], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 26]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 28], + "to": [11, 7, 29], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 28]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [13, 3, 3], + "to": [15, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 7, 7]}, + "faces": { + "north": {"uv": [7, 4.5, 8, 9.5], "texture": "#1"}, + "east": {"uv": [8.5, 1.5, 13.5, 6.5], "texture": "#3"}, + "south": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"}, + "west": {"uv": [3, 3, 13, 13], "texture": "#4"}, + "up": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"}, + "down": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"} + } + }, + { + "from": [15, 3, 3], + "to": [16, 13, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 3]}, + "faces": { + "north": {"uv": [3, 4.5, 3.5, 9.5], "texture": "#1"}, + "east": {"uv": [7, 4.5, 8, 9.5], "texture": "#1"}, + "south": {"uv": [7, 4.5, 7.5, 9.5], "texture": "#1"}, + "up": {"uv": [3, 4.5, 3.5, 5.5], "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 4.5], "texture": "#1"} + } + }, + { + "from": [15, 3, 11], + "to": [16, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 11]}, + "faces": { + "north": {"uv": [3.5, 4.5, 4, 9.5], "texture": "#1"}, + "east": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"}, + "south": {"uv": [3, 4.5, 3.5, 9.5], "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 4.5], "texture": "#1"}, + "down": {"uv": [3, 4.5, 3.5, 5.5], "texture": "#1"} + } + }, + { + "from": [15, 11, 5], + "to": [16, 13, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [14, 3, 9]}, + "faces": { + "east": {"uv": [4, 4.5, 7, 5.5], "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 8.5], "texture": "#1"}, + "down": {"uv": [3.5, 5.5, 4, 8.5], "texture": "#1"} + } + }, + { + "from": [15, 3, 5], + "to": [16, 5, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [14, -5, 9]}, + "faces": { + "east": {"uv": [4, 8.5, 7, 9.5], "texture": "#1"}, + "up": {"uv": [3.5, 5.5, 4, 8.5], "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 8.5], "texture": "#1"} + } + }, + { + "from": [-1, 3, 5], + "to": [0, 5, 11], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "west": {"uv": [4, 9.5, 7, 8.5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [3.5, 5.5, 4, 8.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 8.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [-1, 3, 11], + "to": [0, 13, 13], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "north": {"uv": [3.5, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "south": {"uv": [3, 4.5, 3.5, 9.5], "rotation": 180, "texture": "#1"}, + "west": {"uv": [7, 4.5, 8, 9.5], "texture": "#1"}, + "up": {"uv": [3, 8.5, 3.5, 9.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 4.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [-1, 3, 3], + "to": [0, 13, 5], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "north": {"uv": [3, 4.5, 3.5, 9.5], "rotation": 180, "texture": "#1"}, + "south": {"uv": [3.5, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "west": {"uv": [4, 4.5, 3, 9.5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 4.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 4.5, 3.5, 5.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [0, 3, 3], + "to": [2, 13, 13], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "north": {"uv": [4, 4.5, 3, 9.5], "rotation": 180, "texture": "#1"}, + "east": {"uv": [3, 3, 13, 13], "rotation": 180, "texture": "#4"}, + "south": {"uv": [3, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "west": {"uv": [8.5, 1.5, 13.5, 6.5], "rotation": 180, "texture": "#3"}, + "up": {"uv": [3, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [-1, 11, 5], + "to": [0, 13, 11], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "west": {"uv": [4, 5.5, 7, 4.5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 8.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3.5, 5.5, 4, 8.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [5, 5, 0], + "to": [11, 11, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 6, 0]}, + "faces": { + "north": {"uv": [8, 0, 11, 3], "texture": "#1"}, + "east": {"uv": [6, 0, 5, 3], "texture": "#1"}, + "south": {"uv": [5, 0, 8, 3], "texture": "#1"}, + "west": {"uv": [5, 0, 6, 3], "texture": "#1"}, + "up": {"uv": [5, 0, 6, 3], "rotation": 90, "texture": "#1"}, + "down": {"uv": [5, 0, 6, 3], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [5, 5, 30], + "to": [11, 11, 32], + "rotation": {"angle": 0, "axis": "x", "origin": [7, 10, 32]}, + "faces": { + "north": {"uv": [5, 0, 8, 3], "rotation": 180, "texture": "#1"}, + "east": {"uv": [6, 0, 5, 3], "rotation": 180, "texture": "#1"}, + "south": {"uv": [8, 0, 11, 3], "rotation": 180, "texture": "#1"}, + "west": {"uv": [5, 0, 6, 3], "rotation": 180, "texture": "#1"}, + "up": {"uv": [6, 0, 5, 3], "rotation": 90, "texture": "#1"}, + "down": {"uv": [5, 0, 6, 3], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [0, 0, 0], + "to": [2, 8, 2], + "faces": { + "north": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "east": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "south": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "west": {"uv": [2, 0, 0, 8], "texture": "#2"}, + "up": {"uv": [0, 0, 2, 2], "rotation": 270, "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [0, 0, 14], + "to": [2, 8, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 14]}, + "faces": { + "north": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "east": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "south": {"uv": [2, 0, 0, 8], "texture": "#2"}, + "west": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "up": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [14, 0, 14], + "to": [16, 8, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 14]}, + "faces": { + "north": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "east": {"uv": [2, 0, 0, 8], "texture": "#2"}, + "south": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "west": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [14, 0, 0], + "to": [16, 8, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 0]}, + "faces": { + "north": {"uv": [2, 0, 0, 8], "texture": "#2"}, + "east": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "south": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "west": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [1, 0, 2], + "to": [1, 8, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 2]}, + "faces": { + "north": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "east": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "west": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 6], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 6], "texture": "#1"} + } + }, + { + "from": [6, 13, 7], + "to": [6, 17, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 4, 2]}, + "faces": { + "north": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "east": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "south": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "west": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "up": {"uv": [8, 14, 8, 15], "texture": "#1"}, + "down": {"uv": [8, 14, 8, 15], "texture": "#1"} + } + }, + { + "from": [10, 13, 7], + "to": [10, 17, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 4, 2]}, + "faces": { + "north": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "east": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "south": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "west": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "up": {"uv": [8, 14, 8, 15], "texture": "#1"}, + "down": {"uv": [8, 14, 8, 15], "texture": "#1"} + } + }, + { + "from": [15, 0, 2], + "to": [15, 8, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 2]}, + "faces": { + "north": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "east": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "west": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 6], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 6], "texture": "#1"} + } + }, + { + "from": [8, 8, 2], + "to": [8, 16, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 4, 2]}, + "faces": { + "north": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "east": {"uv": [4.5, 12, 8, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "west": {"uv": [8, 12, 4.5, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3.5], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3.5], "texture": "#1"} + } + }, + { + "from": [5, 9, 24], + "to": [11, 14, 30], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 12, 28]}, + "faces": { + "north": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "east": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "south": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "west": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "up": {"uv": [11, 3, 8, 6], "rotation": 90, "texture": "#1"}, + "down": {"uv": [5, 0, 8, 3], "texture": "#1"} + } + }, + { + "from": [9.01, 7, 24], + "to": [9.01, 17, 30], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 14, 28]}, + "faces": { + "north": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "west": {"uv": [3, 0, 0, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3], "texture": "#1"} + } + }, + { + "from": [6.99, 7, 24], + "to": [6.99, 17, 30], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 14, 28]}, + "faces": { + "north": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "west": {"uv": [3, 0, 0, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3], "texture": "#1"} + } + }, + { + "from": [4.99, 17, 24], + "to": [6.99, 17, 30], + "rotation": {"angle": -45, "axis": "z", "origin": [7, 17, 28]}, + "faces": { + "north": {"uv": [0, 0, 0, 1], "rotation": 90, "texture": "#1"}, + "east": {"uv": [0, 0, 0, 3], "rotation": 270, "texture": "#1"}, + "south": {"uv": [0, 0, 0, 1], "rotation": 270, "texture": "#1"}, + "west": {"uv": [0, 0, 0, 3], "rotation": 270, "texture": "#1"}, + "up": {"uv": [3.5, 4.5, 6.5, 3.5], "rotation": 270, "texture": "#1"}, + "down": {"uv": [6.5, 4.5, 3.5, 3.5], "rotation": 270, "texture": "#1"} + } + }, + { + "from": [9.01, 17, 24], + "to": [9.01, 19, 30], + "rotation": {"angle": -45, "axis": "z", "origin": [9.01, 17, 28]}, + "faces": { + "north": {"uv": [0, 0, 0, 1], "texture": "#1"}, + "east": {"uv": [3.5, 4.5, 6.5, 3.5], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 1], "texture": "#1"}, + "west": {"uv": [6.5, 4.5, 3.5, 3.5], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3], "texture": "#1"} + } + }, + { + "from": [2, 11, 7], + "to": [13, 13, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 11, 7]}, + "faces": { + "north": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"}, + "south": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"}, + "up": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"}, + "down": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [2, 0, 1], + "to": [14, 8, 1], + "faces": { + "north": {"uv": [2, 8, 14, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 0, 4], "texture": "#missing"}, + "south": {"uv": [2, 8, 14, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 0, 4], "texture": "#missing"}, + "up": {"uv": [0, 0, 6, 0], "texture": "#missing"}, + "down": {"uv": [0, 0, 6, 0], "texture": "#missing"} + } + }, + { + "from": [6, 15, 7], + "to": [10, 17, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 15, 7]}, + "faces": { + "north": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"}, + "south": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"}, + "up": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"}, + "down": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_switch/block_primary.json b/src/main/resources/assets/tfmg/models/block/large_switch/block_primary.json new file mode 100644 index 00000000..f6fcba09 --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_switch/block_primary.json @@ -0,0 +1,394 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "parent": "block/block", + "texture_size": [32, 32], + "textures": { + "1": "tfmg:block/large_switch", + "2": "tfmg:block/steel_truss", + "3": "tfmg:block/generator", + "4": "tfmg:block/heavy_machinery_casing", + "particle": "tfmg:block/steel_truss" + }, + "elements": [ + { + "from": [6, 2, 1], + "to": [10, 6, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 2, 0]}, + "faces": { + "east": {"uv": [14, 0, 16, 7.5], "rotation": 90, "texture": "#1"}, + "west": {"uv": [14, 0, 16, 7.5], "rotation": 90, "texture": "#1"}, + "up": {"uv": [14, 0, 16, 7.5], "texture": "#1"}, + "down": {"uv": [14, 0, 16, 7.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 2], + "to": [11, 7, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 2]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 4], + "to": [11, 7, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 4]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 6], + "to": [11, 7, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 6]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 8], + "to": [11, 7, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 8]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 10], + "to": [11, 7, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 10]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 12], + "to": [11, 7, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 12]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 14], + "to": [11, 7, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 14]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [13, 3, 3], + "to": [15, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 7, 7]}, + "faces": { + "north": {"uv": [7, 4.5, 8, 9.5], "texture": "#1"}, + "east": {"uv": [8.5, 1.5, 13.5, 6.5], "texture": "#3"}, + "south": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"}, + "west": {"uv": [3, 3, 13, 13], "texture": "#4"}, + "up": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"}, + "down": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"} + } + }, + { + "from": [15, 3, 3], + "to": [16, 13, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 3]}, + "faces": { + "north": {"uv": [3, 4.5, 3.5, 9.5], "texture": "#1"}, + "east": {"uv": [7, 4.5, 8, 9.5], "texture": "#1"}, + "south": {"uv": [7, 4.5, 7.5, 9.5], "texture": "#1"}, + "up": {"uv": [3, 4.5, 3.5, 5.5], "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 4.5], "texture": "#1"} + } + }, + { + "from": [15, 3, 11], + "to": [16, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 11]}, + "faces": { + "north": {"uv": [3.5, 4.5, 4, 9.5], "texture": "#1"}, + "east": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"}, + "south": {"uv": [3, 4.5, 3.5, 9.5], "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 4.5], "texture": "#1"}, + "down": {"uv": [3, 4.5, 3.5, 5.5], "texture": "#1"} + } + }, + { + "from": [15, 11, 5], + "to": [16, 13, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [14, 3, 9]}, + "faces": { + "east": {"uv": [4, 4.5, 7, 5.5], "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 8.5], "texture": "#1"}, + "down": {"uv": [3.5, 5.5, 4, 8.5], "texture": "#1"} + } + }, + { + "from": [15, 3, 5], + "to": [16, 5, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [14, -5, 9]}, + "faces": { + "east": {"uv": [4, 8.5, 7, 9.5], "texture": "#1"}, + "up": {"uv": [3.5, 5.5, 4, 8.5], "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 8.5], "texture": "#1"} + } + }, + { + "from": [-1, 3, 5], + "to": [0, 5, 11], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "west": {"uv": [4, 9.5, 7, 8.5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [3.5, 5.5, 4, 8.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 8.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [-1, 3, 11], + "to": [0, 13, 13], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "north": {"uv": [3.5, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "south": {"uv": [3, 4.5, 3.5, 9.5], "rotation": 180, "texture": "#1"}, + "west": {"uv": [7, 4.5, 8, 9.5], "texture": "#1"}, + "up": {"uv": [3, 8.5, 3.5, 9.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 4.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [-1, 3, 3], + "to": [0, 13, 5], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "north": {"uv": [3, 4.5, 3.5, 9.5], "rotation": 180, "texture": "#1"}, + "south": {"uv": [3.5, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "west": {"uv": [4, 4.5, 3, 9.5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 4.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 4.5, 3.5, 5.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [0, 3, 3], + "to": [2, 13, 13], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "north": {"uv": [4, 4.5, 3, 9.5], "rotation": 180, "texture": "#1"}, + "east": {"uv": [3, 3, 13, 13], "rotation": 180, "texture": "#4"}, + "south": {"uv": [3, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "west": {"uv": [8.5, 1.5, 13.5, 6.5], "rotation": 180, "texture": "#3"}, + "up": {"uv": [3, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [-1, 11, 5], + "to": [0, 13, 11], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "west": {"uv": [4, 5.5, 7, 4.5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 8.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3.5, 5.5, 4, 8.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [5, 5, 0], + "to": [11, 11, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 6, 0]}, + "faces": { + "north": {"uv": [8, 0, 11, 3], "texture": "#1"}, + "east": {"uv": [6, 0, 5, 3], "texture": "#1"}, + "south": {"uv": [5, 0, 8, 3], "texture": "#1"}, + "west": {"uv": [5, 0, 6, 3], "texture": "#1"}, + "up": {"uv": [5, 0, 6, 3], "rotation": 90, "texture": "#1"}, + "down": {"uv": [5, 0, 6, 3], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [0, 0, 0], + "to": [2, 8, 2], + "faces": { + "north": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "east": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "south": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "west": {"uv": [2, 8, 0, 0], "texture": "#2"}, + "up": {"uv": [0, 6, 2, 8], "rotation": 270, "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [0, 0, 14], + "to": [2, 8, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 14]}, + "faces": { + "north": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "east": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "south": {"uv": [2, 8, 0, 0], "texture": "#2"}, + "west": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "up": {"uv": [0, 6, 2, 8], "rotation": 180, "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [14, 0, 14], + "to": [16, 8, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 14]}, + "faces": { + "north": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "east": {"uv": [2, 8, 0, 0], "texture": "#2"}, + "south": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "west": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "up": {"uv": [0, 6, 2, 8], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [14, 0, 0], + "to": [16, 8, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 0]}, + "faces": { + "north": {"uv": [2, 8, 0, 0], "texture": "#2"}, + "east": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "south": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "west": {"uv": [0, 8, 2, 0], "texture": "#2"}, + "up": {"uv": [0, 6, 2, 8], "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [1, 0, 2], + "to": [1, 8, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 2]}, + "faces": { + "north": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "east": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "west": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 6], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 6], "texture": "#1"} + } + }, + { + "from": [6, 13, 7], + "to": [6, 17, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 4, 2]}, + "faces": { + "north": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "east": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "south": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "west": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "up": {"uv": [8, 14, 8, 15], "texture": "#1"}, + "down": {"uv": [8, 14, 8, 15], "texture": "#1"} + } + }, + { + "from": [10, 13, 7], + "to": [10, 17, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 4, 2]}, + "faces": { + "north": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "east": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "south": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "west": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "up": {"uv": [8, 14, 8, 15], "texture": "#1"}, + "down": {"uv": [8, 14, 8, 15], "texture": "#1"} + } + }, + { + "from": [15, 0, 2], + "to": [15, 8, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 2]}, + "faces": { + "north": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "east": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "west": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 6], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 6], "texture": "#1"} + } + }, + { + "from": [8, 8, 2], + "to": [8, 16, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 4, 2]}, + "faces": { + "north": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "east": {"uv": [4.5, 12, 8, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "west": {"uv": [8, 12, 4.5, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3.5], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3.5], "texture": "#1"} + } + }, + { + "from": [2, 11, 7], + "to": [13, 13, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 11, 7]}, + "faces": { + "north": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"}, + "south": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"}, + "up": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"}, + "down": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [2, 0, 1], + "to": [14, 8, 1], + "faces": { + "north": {"uv": [2, 8, 14, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 0, 4], "texture": "#missing"}, + "south": {"uv": [2, 8, 14, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 0, 4], "texture": "#missing"}, + "up": {"uv": [0, 0, 6, 0], "texture": "#missing"}, + "down": {"uv": [0, 0, 6, 0], "texture": "#missing"} + } + }, + { + "from": [6, 15, 7], + "to": [10, 17, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 15, 7]}, + "faces": { + "north": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"}, + "south": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"}, + "up": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"}, + "down": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_switch/block_secondary.json b/src/main/resources/assets/tfmg/models/block/large_switch/block_secondary.json new file mode 100644 index 00000000..7fab64f9 --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_switch/block_secondary.json @@ -0,0 +1,193 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "parent": "block/block", + "texture_size": [32, 32], + "textures": { + "1": "tfmg:block/large_switch", + "particle": "tfmg:block/steel_truss" + }, + "elements": [ + { + "from": [6, 2, 0], + "to": [10, 6, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 2, -16]}, + "faces": { + "east": {"uv": [14, 0, 16, 15], "rotation": 90, "texture": "#1"}, + "south": {"uv": [12, 3, 14, 5], "texture": "#1"}, + "west": {"uv": [14, 0, 16, 15], "rotation": 90, "texture": "#1"}, + "up": {"uv": [14, 0, 16, 15], "texture": "#1"}, + "down": {"uv": [14, 0, 16, 15], "texture": "#1"} + } + }, + { + "from": [5, 1, 0], + "to": [11, 7, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 0]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 2], + "to": [11, 7, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 2]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 4], + "to": [11, 7, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 4]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 6], + "to": [11, 7, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 6]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 8], + "to": [11, 7, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 8]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 10], + "to": [11, 7, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 10]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 12], + "to": [11, 7, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 12]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 5, 14], + "to": [11, 11, 16], + "rotation": {"angle": 0, "axis": "x", "origin": [7, 10, 16]}, + "faces": { + "north": {"uv": [5, 0, 8, 3], "rotation": 180, "texture": "#1"}, + "east": {"uv": [6, 0, 5, 3], "rotation": 180, "texture": "#1"}, + "south": {"uv": [8, 0, 11, 3], "rotation": 180, "texture": "#1"}, + "west": {"uv": [5, 0, 6, 3], "rotation": 180, "texture": "#1"}, + "up": {"uv": [6, 0, 5, 3], "rotation": 90, "texture": "#1"}, + "down": {"uv": [5, 0, 6, 3], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [5, 9, 8], + "to": [11, 14, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 12, 12]}, + "faces": { + "north": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "east": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "south": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "west": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "up": {"uv": [11, 3, 8, 6], "rotation": 90, "texture": "#1"}, + "down": {"uv": [5, 0, 8, 3], "texture": "#1"} + } + }, + { + "from": [9.01, 7, 8], + "to": [9.01, 17, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 14, 12]}, + "faces": { + "north": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "west": {"uv": [3, 0, 0, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3], "texture": "#1"} + } + }, + { + "from": [6.99, 7, 8], + "to": [6.99, 17, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 14, 12]}, + "faces": { + "north": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "west": {"uv": [3, 0, 0, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3], "texture": "#1"} + } + }, + { + "from": [4.99, 17, 8], + "to": [6.99, 17, 14], + "rotation": {"angle": -45, "axis": "z", "origin": [7, 17, 12]}, + "faces": { + "north": {"uv": [0, 0, 0, 1], "rotation": 90, "texture": "#1"}, + "east": {"uv": [0, 0, 0, 3], "rotation": 270, "texture": "#1"}, + "south": {"uv": [0, 0, 0, 1], "rotation": 270, "texture": "#1"}, + "west": {"uv": [0, 0, 0, 3], "rotation": 270, "texture": "#1"}, + "up": {"uv": [3.5, 4.5, 6.5, 3.5], "rotation": 270, "texture": "#1"}, + "down": {"uv": [6.5, 4.5, 3.5, 3.5], "rotation": 270, "texture": "#1"} + } + }, + { + "from": [9.01, 17, 8], + "to": [9.01, 19, 14], + "rotation": {"angle": -45, "axis": "z", "origin": [9.01, 17, 12]}, + "faces": { + "north": {"uv": [0, 0, 0, 1], "texture": "#1"}, + "east": {"uv": [3.5, 4.5, 6.5, 3.5], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 1], "texture": "#1"}, + "west": {"uv": [6.5, 4.5, 3.5, 3.5], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3], "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_switch/buffer.json b/src/main/resources/assets/tfmg/models/block/large_switch/buffer.json new file mode 100644 index 00000000..5177883e --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_switch/buffer.json @@ -0,0 +1,6 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "parent": "block/block", + "texture_size": [32, 32] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_switch/connector.json b/src/main/resources/assets/tfmg/models/block/large_switch/connector.json new file mode 100644 index 00000000..e249d6dd --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_switch/connector.json @@ -0,0 +1,51 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "parent": "block/block", + "texture_size": [32, 32], + "textures": { + "1": "tfmg:block/large_switch", + "particle": "tfmg:block/steel_truss" + }, + "elements": [ + { + "from": [9, 6.01, 26], + "to": [9, 7.01, 29], + "rotation": {"angle": 0, "axis": "x", "origin": [7, 8, 8]}, + "faces": { + "north": {"uv": [0, 5, 1, 6], "texture": "#1"}, + "east": {"uv": [1.5, 6.5, 1, 5], "rotation": 90, "texture": "#1"}, + "south": {"uv": [0, 5, 1, 6], "texture": "#1"}, + "west": {"uv": [1.5, 5, 1, 6.5], "rotation": 90, "texture": "#1"}, + "up": {"uv": [0, 16, 1, 5], "texture": "#1"}, + "down": {"uv": [0, 5, 1, 16], "texture": "#1"} + } + }, + { + "from": [7, 7.01, 7], + "to": [9, 9.01, 29], + "rotation": {"angle": 0, "axis": "x", "origin": [7, 8, 8]}, + "faces": { + "north": {"uv": [0, 6.5, 1, 7.5], "texture": "#1"}, + "east": {"uv": [0, 16, 1, 5], "rotation": 90, "texture": "#1"}, + "south": {"uv": [0, 5, 1, 6], "texture": "#1"}, + "west": {"uv": [0, 5, 1, 16], "rotation": 90, "texture": "#1"}, + "up": {"uv": [0, 16, 1, 5], "texture": "#1"}, + "down": {"uv": [0, 5, 1, 16], "texture": "#1"} + } + }, + { + "from": [7, 6.01, 26], + "to": [7, 7.01, 29], + "rotation": {"angle": 0, "axis": "x", "origin": [7, 8, 8]}, + "faces": { + "north": {"uv": [0, 5, 1, 6], "texture": "#1"}, + "east": {"uv": [1.5, 6.5, 1, 5], "rotation": 90, "texture": "#1"}, + "south": {"uv": [0, 5, 1, 6], "texture": "#1"}, + "west": {"uv": [1.5, 5, 1, 6.5], "rotation": 90, "texture": "#1"}, + "up": {"uv": [0, 16, 1, 5], "texture": "#1"}, + "down": {"uv": [0, 5, 1, 16], "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_switch/item.json b/src/main/resources/assets/tfmg/models/block/large_switch/item.json new file mode 100644 index 00000000..e50faba8 --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_switch/item.json @@ -0,0 +1,635 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "parent": "block/block", + "texture_size": [32, 32], + "textures": { + "1": "tfmg:block/large_switch", + "2": "tfmg:block/steel_truss", + "3": "tfmg:block/generator", + "4": "tfmg:block/heavy_machinery_casing", + "6": "tfmg:block/shaft_top", + "particle": "tfmg:block/steel_truss" + }, + "elements": [ + { + "from": [6, 2, 1], + "to": [10, 6, 31], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 2, 0]}, + "faces": { + "east": {"uv": [14, 0, 16, 15], "rotation": 90, "texture": "#1"}, + "south": {"uv": [12, 3, 14, 5], "texture": "#1"}, + "west": {"uv": [14, 0, 16, 15], "rotation": 90, "texture": "#1"}, + "up": {"uv": [14, 0, 16, 15], "texture": "#1"}, + "down": {"uv": [14, 0, 16, 15], "texture": "#1"} + } + }, + { + "from": [5, 1, 2], + "to": [11, 7, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 2]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 4], + "to": [11, 7, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 4]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 6], + "to": [11, 7, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 6]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 8], + "to": [11, 7, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 8]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 10], + "to": [11, 7, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 10]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 12], + "to": [11, 7, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 12]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 14], + "to": [11, 7, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 14]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 16], + "to": [11, 7, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 16]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 18], + "to": [11, 7, 19], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 18]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 20], + "to": [11, 7, 21], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 20]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 22], + "to": [11, 7, 23], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 22]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 24], + "to": [11, 7, 25], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 24]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 26], + "to": [11, 7, 27], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 26]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [5, 1, 28], + "to": [11, 7, 29], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 28]}, + "faces": { + "north": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "east": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "south": {"uv": [11, 0, 14, 3], "texture": "#1"}, + "west": {"uv": [11, 0, 11.5, 3], "texture": "#1"}, + "up": {"uv": [11, 0, 14, 0.5], "texture": "#1"}, + "down": {"uv": [11, 0, 14, 0.5], "texture": "#1"} + } + }, + { + "from": [13, 3, 3], + "to": [15, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 7, 7]}, + "faces": { + "north": {"uv": [7, 4.5, 8, 9.5], "texture": "#1"}, + "east": {"uv": [8.5, 1.5, 13.5, 6.5], "texture": "#3"}, + "south": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"}, + "west": {"uv": [3, 3, 13, 13], "texture": "#4"}, + "up": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"}, + "down": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"} + } + }, + { + "from": [15, 3, 3], + "to": [16, 13, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 3]}, + "faces": { + "north": {"uv": [3, 4.5, 3.5, 9.5], "texture": "#1"}, + "east": {"uv": [7, 4.5, 8, 9.5], "texture": "#1"}, + "south": {"uv": [7, 4.5, 7.5, 9.5], "texture": "#1"}, + "up": {"uv": [3, 4.5, 3.5, 5.5], "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 4.5], "texture": "#1"} + } + }, + { + "from": [15, 3, 11], + "to": [16, 13, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 3, 11]}, + "faces": { + "north": {"uv": [3.5, 4.5, 4, 9.5], "texture": "#1"}, + "east": {"uv": [3, 4.5, 4, 9.5], "texture": "#1"}, + "south": {"uv": [3, 4.5, 3.5, 9.5], "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 4.5], "texture": "#1"}, + "down": {"uv": [3, 4.5, 3.5, 5.5], "texture": "#1"} + } + }, + { + "from": [15, 11, 5], + "to": [16, 13, 11], + "rotation": {"angle": 0, "axis": "x", "origin": [14, 3, 9]}, + "faces": { + "east": {"uv": [4, 4.5, 7, 5.5], "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 8.5], "texture": "#1"}, + "down": {"uv": [3.5, 5.5, 4, 8.5], "texture": "#1"} + } + }, + { + "from": [15, 3, 5], + "to": [16, 5, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [14, -5, 9]}, + "faces": { + "east": {"uv": [4, 8.5, 7, 9.5], "texture": "#1"}, + "up": {"uv": [3.5, 5.5, 4, 8.5], "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 8.5], "texture": "#1"} + } + }, + { + "from": [-1, 3, 5], + "to": [0, 5, 11], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "west": {"uv": [4, 9.5, 7, 8.5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [3.5, 5.5, 4, 8.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 8.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [-1, 3, 11], + "to": [0, 13, 13], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "north": {"uv": [3.5, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "south": {"uv": [3, 4.5, 3.5, 9.5], "rotation": 180, "texture": "#1"}, + "west": {"uv": [7, 4.5, 8, 9.5], "texture": "#1"}, + "up": {"uv": [3, 8.5, 3.5, 9.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 5.5, 3.5, 4.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [-1, 3, 3], + "to": [0, 13, 5], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "north": {"uv": [3, 4.5, 3.5, 9.5], "rotation": 180, "texture": "#1"}, + "south": {"uv": [3.5, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "west": {"uv": [4, 4.5, 3, 9.5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 4.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 4.5, 3.5, 5.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [0, 3, 3], + "to": [2, 13, 13], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "north": {"uv": [4, 4.5, 3, 9.5], "rotation": 180, "texture": "#1"}, + "east": {"uv": [3, 3, 13, 13], "rotation": 180, "texture": "#4"}, + "south": {"uv": [3, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "west": {"uv": [8.5, 1.5, 13.5, 6.5], "rotation": 180, "texture": "#3"}, + "up": {"uv": [3, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3, 4.5, 4, 9.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [-1, 11, 5], + "to": [0, 13, 11], + "rotation": {"angle": 0, "axis": "z", "origin": [1, 8, 9]}, + "faces": { + "west": {"uv": [4, 5.5, 7, 4.5], "rotation": 180, "texture": "#1"}, + "up": {"uv": [3, 5.5, 3.5, 8.5], "rotation": 180, "texture": "#1"}, + "down": {"uv": [3.5, 5.5, 4, 8.5], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [5, 5, 0], + "to": [11, 11, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 6, 0]}, + "faces": { + "north": {"uv": [8, 0, 11, 3], "texture": "#1"}, + "east": {"uv": [6, 0, 5, 3], "texture": "#1"}, + "south": {"uv": [5, 0, 8, 3], "texture": "#1"}, + "west": {"uv": [5, 0, 6, 3], "texture": "#1"}, + "up": {"uv": [5, 0, 6, 3], "rotation": 90, "texture": "#1"}, + "down": {"uv": [5, 0, 6, 3], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [5, 5, 30], + "to": [11, 11, 32], + "rotation": {"angle": 0, "axis": "x", "origin": [7, 10, 32]}, + "faces": { + "north": {"uv": [5, 0, 8, 3], "rotation": 180, "texture": "#1"}, + "east": {"uv": [6, 0, 5, 3], "rotation": 180, "texture": "#1"}, + "south": {"uv": [8, 0, 11, 3], "rotation": 180, "texture": "#1"}, + "west": {"uv": [5, 0, 6, 3], "rotation": 180, "texture": "#1"}, + "up": {"uv": [6, 0, 5, 3], "rotation": 90, "texture": "#1"}, + "down": {"uv": [5, 0, 6, 3], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [0, 0, 0], + "to": [2, 8, 2], + "faces": { + "north": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "east": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "south": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "west": {"uv": [2, 0, 0, 8], "texture": "#2"}, + "up": {"uv": [0, 0, 2, 2], "rotation": 270, "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [0, 0, 14], + "to": [2, 8, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 14]}, + "faces": { + "north": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "east": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "south": {"uv": [2, 0, 0, 8], "texture": "#2"}, + "west": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "up": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [14, 0, 14], + "to": [16, 8, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 14]}, + "faces": { + "north": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "east": {"uv": [2, 0, 0, 8], "texture": "#2"}, + "south": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "west": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [14, 0, 0], + "to": [16, 8, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 0]}, + "faces": { + "north": {"uv": [2, 0, 0, 8], "texture": "#2"}, + "east": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "south": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "west": {"uv": [0, 0, 2, 8], "texture": "#2"}, + "up": {"uv": [0, 0, 2, 2], "texture": "#2"}, + "down": {"uv": [0, 0, 2, 2], "texture": "#2"} + } + }, + { + "from": [1, 0, 2], + "to": [1, 8, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 2]}, + "faces": { + "north": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "east": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "west": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 6], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 6], "texture": "#1"} + } + }, + { + "from": [6, 13, 7], + "to": [6, 17, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 4, 2]}, + "faces": { + "north": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "east": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "south": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "west": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "up": {"uv": [8, 14, 8, 15], "texture": "#1"}, + "down": {"uv": [8, 14, 8, 15], "texture": "#1"} + } + }, + { + "from": [10, 13, 7], + "to": [10, 17, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 4, 2]}, + "faces": { + "north": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "east": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "south": {"uv": [8, 14, 8, 16], "texture": "#1"}, + "west": {"uv": [8, 14, 9, 16], "texture": "#1"}, + "up": {"uv": [8, 14, 8, 15], "texture": "#1"}, + "down": {"uv": [8, 14, 8, 15], "texture": "#1"} + } + }, + { + "from": [15, 0, 2], + "to": [15, 8, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0, 2]}, + "faces": { + "north": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "east": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "west": {"uv": [8, 12, 14, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 6], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 6], "texture": "#1"} + } + }, + { + "from": [8, 8, 2], + "to": [8, 16, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 4, 2]}, + "faces": { + "north": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "east": {"uv": [4.5, 12, 8, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 4], "texture": "#1"}, + "west": {"uv": [8, 12, 4.5, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3.5], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3.5], "texture": "#1"} + } + }, + { + "from": [5, 9, 24], + "to": [11, 14, 30], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 12, 28]}, + "faces": { + "north": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "east": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "south": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "west": {"uv": [8, 6, 11, 8.5], "texture": "#1"}, + "up": {"uv": [11, 3, 8, 6], "rotation": 90, "texture": "#1"}, + "down": {"uv": [5, 0, 8, 3], "texture": "#1"} + } + }, + { + "from": [9.01, 7, 24], + "to": [9.01, 17, 30], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 14, 28]}, + "faces": { + "north": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "west": {"uv": [3, 0, 0, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3], "texture": "#1"} + } + }, + { + "from": [6.99, 7, 24], + "to": [6.99, 17, 30], + "rotation": {"angle": 0, "axis": "y", "origin": [4, 14, 28]}, + "faces": { + "north": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "east": {"uv": [0, 0, 3, 5], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 5], "texture": "#1"}, + "west": {"uv": [3, 0, 0, 5], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3], "texture": "#1"} + } + }, + { + "from": [4.99, 17, 24], + "to": [6.99, 17, 30], + "rotation": {"angle": -45, "axis": "z", "origin": [7, 17, 28]}, + "faces": { + "north": {"uv": [0, 0, 0, 1], "rotation": 90, "texture": "#1"}, + "east": {"uv": [0, 0, 0, 3], "rotation": 270, "texture": "#1"}, + "south": {"uv": [0, 0, 0, 1], "rotation": 270, "texture": "#1"}, + "west": {"uv": [0, 0, 0, 3], "rotation": 270, "texture": "#1"}, + "up": {"uv": [3.5, 4.5, 6.5, 3.5], "rotation": 270, "texture": "#1"}, + "down": {"uv": [6.5, 4.5, 3.5, 3.5], "rotation": 270, "texture": "#1"} + } + }, + { + "from": [9.01, 17, 24], + "to": [9.01, 19, 30], + "rotation": {"angle": -45, "axis": "z", "origin": [9.01, 17, 28]}, + "faces": { + "north": {"uv": [0, 0, 0, 1], "texture": "#1"}, + "east": {"uv": [3.5, 4.5, 6.5, 3.5], "texture": "#1"}, + "south": {"uv": [0, 0, 0, 1], "texture": "#1"}, + "west": {"uv": [6.5, 4.5, 3.5, 3.5], "texture": "#1"}, + "up": {"uv": [0, 0, 0, 3], "texture": "#1"}, + "down": {"uv": [0, 0, 0, 3], "texture": "#1"} + } + }, + { + "from": [2, 11, 7], + "to": [13, 13, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 11, 7]}, + "faces": { + "north": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"}, + "south": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"}, + "up": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"}, + "down": {"uv": [11, 3.5, 12, 9], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [2, 0, 1], + "to": [14, 8, 1], + "faces": { + "north": {"uv": [2, 8, 14, 16], "texture": "#2"}, + "east": {"uv": [0, 0, 0, 4], "texture": "#missing"}, + "south": {"uv": [2, 8, 14, 16], "texture": "#2"}, + "west": {"uv": [0, 0, 0, 4], "texture": "#missing"}, + "up": {"uv": [0, 0, 6, 0], "texture": "#missing"}, + "down": {"uv": [0, 0, 6, 0], "texture": "#missing"} + } + }, + { + "from": [7, 15.01, 6], + "to": [9, 17.01, 28], + "rotation": {"angle": -22.5, "axis": "x", "origin": [7, 16, 8]}, + "faces": { + "north": {"uv": [0, 6.5, 1, 7.5], "texture": "#1"}, + "east": {"uv": [0, 16, 1, 5], "rotation": 90, "texture": "#1"}, + "south": {"uv": [0, 5, 1, 6], "texture": "#1"}, + "west": {"uv": [0, 5, 1, 16], "rotation": 90, "texture": "#1"}, + "up": {"uv": [0, 16, 1, 5], "texture": "#1"}, + "down": {"uv": [0, 5, 1, 16], "texture": "#1"} + } + }, + { + "from": [9, 14.01, 25], + "to": [9, 15.01, 28], + "rotation": {"angle": -22.5, "axis": "x", "origin": [7, 16, 8]}, + "faces": { + "north": {"uv": [0, 5, 1, 6], "texture": "#1"}, + "east": {"uv": [1.5, 6.5, 1, 5], "rotation": 90, "texture": "#1"}, + "south": {"uv": [0, 5, 1, 6], "texture": "#1"}, + "west": {"uv": [1.5, 5, 1, 6.5], "rotation": 90, "texture": "#1"}, + "up": {"uv": [0, 16, 1, 5], "texture": "#1"}, + "down": {"uv": [0, 5, 1, 16], "texture": "#1"} + } + }, + { + "from": [7, 14.01, 25], + "to": [7, 15.01, 28], + "rotation": {"angle": -22.5, "axis": "x", "origin": [7, 16, 8]}, + "faces": { + "north": {"uv": [0, 5, 1, 6], "texture": "#1"}, + "east": {"uv": [1.5, 6.5, 1, 5], "rotation": 90, "texture": "#1"}, + "south": {"uv": [0, 5, 1, 6], "texture": "#1"}, + "west": {"uv": [1.5, 5, 1, 6.5], "rotation": 90, "texture": "#1"}, + "up": {"uv": [0, 16, 1, 5], "texture": "#1"}, + "down": {"uv": [0, 5, 1, 16], "texture": "#1"} + } + }, + { + "from": [6, 15, 7], + "to": [10, 17, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 15, 7]}, + "faces": { + "north": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"}, + "south": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"}, + "up": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"}, + "down": {"uv": [8, 14, 9, 16], "rotation": 90, "texture": "#1"} + } + }, + { + "from": [15, 6, 6], + "to": [16, 10, 10], + "rotation": {"angle": -22.5, "axis": "x", "origin": [14, 8, 8]}, + "faces": { + "north": {"uv": [6, 6, 7, 10], "texture": "#6"}, + "east": {"uv": [6, 6, 10, 10], "texture": "#6"}, + "south": {"uv": [6, 6, 7, 10], "texture": "#6"}, + "up": {"uv": [6.5, 6, 7, 8], "texture": "#6"}, + "down": {"uv": [6, 6, 7, 10], "texture": "#6"} + } + }, + { + "from": [-1, 6, 6], + "to": [0, 10, 10], + "rotation": {"angle": -22.5, "axis": "x", "origin": [1, 8, 8]}, + "faces": { + "north": {"uv": [6, 6, 7, 10], "rotation": 180, "texture": "#6"}, + "south": {"uv": [6, 6, 7, 10], "rotation": 180, "texture": "#6"}, + "west": {"uv": [6, 6, 10, 10], "rotation": 180, "texture": "#6"}, + "up": {"uv": [6, 6, 7, 10], "rotation": 180, "texture": "#6"}, + "down": {"uv": [6.5, 6, 7, 8], "rotation": 180, "texture": "#6"} + } + } + ], + "display": { + "gui": { + "rotation": [24, -41, 4], + "translation": [1.75, 1, 1.25], + "scale": [0.46, 0.46, 0.46] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_switch/shaft.json b/src/main/resources/assets/tfmg/models/block/large_switch/shaft.json new file mode 100644 index 00000000..948d344e --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_switch/shaft.json @@ -0,0 +1,36 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "parent": "block/block", + "texture_size": [32, 32], + "textures": { + "6": "tfmg:block/shaft_top", + "particle": "tfmg:block/steel_truss" + }, + "elements": [ + { + "from": [6, 6, 15], + "to": [10, 10, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "east": {"uv": [6, 6, 7, 10], "texture": "#6"}, + "south": {"uv": [6, 6, 10, 10], "texture": "#6"}, + "west": {"uv": [6, 6, 7, 10], "texture": "#6"}, + "up": {"uv": [6.5, 6, 7, 8], "rotation": 90, "texture": "#6"}, + "down": {"uv": [6, 6, 7, 10], "rotation": 270, "texture": "#6"} + } + }, + { + "from": [6, 6, -1], + "to": [10, 10, 0], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [6, 6, 10, 10], "rotation": 180, "texture": "#6"}, + "east": {"uv": [6, 6, 7, 10], "rotation": 180, "texture": "#6"}, + "west": {"uv": [6, 6, 7, 10], "rotation": 180, "texture": "#6"}, + "up": {"uv": [6, 6, 7, 10], "rotation": 270, "texture": "#6"}, + "down": {"uv": [6.5, 6, 7, 8], "rotation": 90, "texture": "#6"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_transformer/block.json b/src/main/resources/assets/tfmg/models/block/large_transformer/block.json new file mode 100644 index 00000000..b4c40432 --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_transformer/block.json @@ -0,0 +1,145 @@ +{ + "format_version": "1.21.6", + "credit": "Made with Blockbench", + "texture_size": [64, 64], + "textures": { + "0": "tfmg:block/large_transformer", + "particle": "tfmg:block/large_transformer" + }, + "elements": [ + { + "from": [-1, 15, 4], + "to": [17, 17, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [6.25, 4.25, 10.75, 4.75], "texture": "#0"}, + "east": {"uv": [9.5, 3.5, 6.5, 4], "texture": "#0"}, + "west": {"uv": [6.5, 3.5, 9.5, 4], "texture": "#0"}, + "up": {"uv": [0, 4.5, 3, 9], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 4.5, 3, 9], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [-1, 2, 4], + "to": [17, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [6.25, 4.25, 10.75, 4.75], "rotation": 180, "texture": "#0"}, + "east": {"uv": [6.5, 3.5, 9.5, 4], "rotation": 180, "texture": "#0"}, + "west": {"uv": [9.5, 3.5, 6.5, 4], "rotation": 180, "texture": "#0"}, + "up": {"uv": [3, 4.5, 0, 9], "rotation": 270, "texture": "#0"}, + "down": {"uv": [3, 4.5, 0, 9], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [2, 17, 4.99], + "to": [14, 19, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [3.25, 3.5, 6.25, 4], "texture": "#0"}, + "east": {"uv": [6, 4.25, 3.25, 4.75], "texture": "#0"}, + "west": {"uv": [3.25, 4.25, 6, 4.75], "texture": "#0"}, + "up": {"uv": [3.25, 5, 6, 8], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [2, 0, 5], + "to": [14, 2, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [3.25, 3.5, 6.25, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [3.25, 4.25, 6, 4.75], "rotation": 180, "texture": "#0"}, + "west": {"uv": [6, 4.25, 3.25, 4.75], "rotation": 180, "texture": "#0"}, + "down": {"uv": [3.25, 8.25, 6, 11.25], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [-1, 4, 4], + "to": [17, 15, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [6.25, 5, 10.75, 7.75], "texture": "#0"}, + "east": {"uv": [9.75, 3.5, 12.5, 4], "rotation": 90, "texture": "#0"}, + "south": {"uv": [10.75, 7.75, 6.25, 5], "texture": "#0"}, + "west": {"uv": [9.75, 4, 12.5, 3.5], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [-1, 4, 8], + "to": [17, 15, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "south": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [-1, 4, 10], + "to": [17, 15, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "south": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [-1, 4, 12], + "to": [17, 15, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "south": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [-1, 4, 13.9], + "to": [17, 15, 13.9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "south": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [-1, 4, 16], + "to": [17, 15, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "east": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "south": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "west": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [2, 3, 0], + "to": [14, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [0, 0, 3, 3.25], "texture": "#0"}, + "east": {"uv": [7, 0, 3, 3.25], "texture": "#0"}, + "west": {"uv": [3, 0, 7, 3.25], "texture": "#0"}, + "up": {"uv": [0, 3.25, 3, 7.25], "texture": "#0"}, + "down": {"uv": [0, 3.25, 3, 7.25], "rotation": 180, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_transformer/block_unfinished.json b/src/main/resources/assets/tfmg/models/block/large_transformer/block_unfinished.json new file mode 100644 index 00000000..e7bc25f6 --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_transformer/block_unfinished.json @@ -0,0 +1,47 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "textures": { + "0": "tfmg:block/large_coil_top", + "1": "tfmg:block/large_coil_side", + "2": "tfmg:block/transformer_core", + "particle": "tfmg:block/large_coil_top" + }, + "elements": [ + { + "from": [0, 4, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 12], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 12], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 12], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 12], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "from": [4, 16, 4], + "to": [12, 20, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 8]}, + "faces": { + "north": {"uv": [4, 6, 0, 14], "rotation": 90, "texture": "#2"}, + "east": {"uv": [16, 2, 4, 6], "texture": "#2"}, + "west": {"uv": [4, 2, 16, 6], "texture": "#2"}, + "up": {"uv": [16, 6, 4, 14], "rotation": 270, "texture": "#2"} + } + }, + { + "from": [4, 0, 4], + "to": [12, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 8]}, + "faces": { + "north": {"uv": [0, 6, 4, 14], "rotation": 90, "texture": "#2"}, + "east": {"uv": [16, 2, 4, 6], "texture": "#2"}, + "west": {"uv": [4, 2, 16, 6], "texture": "#2"}, + "down": {"uv": [4, 6, 16, 14], "rotation": 270, "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_transformer/item.json b/src/main/resources/assets/tfmg/models/block/large_transformer/item.json new file mode 100644 index 00000000..f5772614 --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_transformer/item.json @@ -0,0 +1,375 @@ +{ + "format_version": "1.21.6", + "parent": "block/block", + "credit": "Made with Blockbench", + "texture_size": [64, 64], + "textures": { + "0": "tfmg:block/large_transformer", + "particle": "tfmg:block/large_transformer" + }, + "elements": [ + { + "from": [-4, 15, -1], + "to": [8, 17, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 15, 7]}, + "faces": { + "north": {"uv": [9.5, 3.5, 6.5, 4], "texture": "#0"}, + "east": {"uv": [6.25, 4.25, 10.75, 4.75], "texture": "#0"}, + "south": {"uv": [6.5, 3.5, 9.5, 4], "texture": "#0"}, + "west": {"uv": [6.25, 4.25, 10.75, 4.75], "texture": "#0"}, + "up": {"uv": [0, 4.5, 3, 9], "texture": "#0"}, + "down": {"uv": [0, 4.5, 3, 9], "texture": "#0"} + } + }, + { + "from": [8, 2, -1], + "to": [20, 4, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 2, 7]}, + "faces": { + "north": {"uv": [6.5, 4, 9.5, 3.5], "texture": "#0"}, + "east": {"uv": [6.25, 4.75, 10.75, 4.25], "texture": "#0"}, + "south": {"uv": [9.5, 4, 6.5, 3.5], "texture": "#0"}, + "west": {"uv": [6.25, 4.25, 10.75, 4.75], "texture": "#0"}, + "up": {"uv": [3, 4.5, 0, 9], "texture": "#0"}, + "down": {"uv": [3, 4.5, 0, 9], "texture": "#0"} + } + }, + { + "from": [-4, 2, -1], + "to": [8, 4, 17], + "rotation": {"angle": 0, "axis": "x", "origin": [9, 3, 8]}, + "faces": { + "north": {"uv": [6.5, 3.5, 9.5, 4], "rotation": 180, "texture": "#0"}, + "east": {"uv": [6.25, 4.25, 10.75, 4.75], "rotation": 180, "texture": "#0"}, + "south": {"uv": [9.5, 3.5, 6.5, 4], "rotation": 180, "texture": "#0"}, + "west": {"uv": [6.25, 4.25, 10.75, 4.75], "rotation": 180, "texture": "#0"}, + "up": {"uv": [3, 4.5, 0, 9], "rotation": 180, "texture": "#0"}, + "down": {"uv": [3, 4.5, 0, 9], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [8, 15, -1], + "to": [20, 17, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 15, 0]}, + "faces": { + "north": {"uv": [6.5, 3.5, 9.5, 4], "texture": "#0"}, + "east": {"uv": [6.25, 4.25, 10.75, 4.75], "texture": "#0"}, + "south": {"uv": [9.5, 3.5, 6.5, 4], "texture": "#0"}, + "west": {"uv": [6.25, 4.25, 10.75, 4.75], "texture": "#0"}, + "up": {"uv": [3, 4.5, 0, 9], "texture": "#0"}, + "down": {"uv": [3, 4.5, 0, 9], "texture": "#0"} + } + }, + { + "from": [-3, 17, 2], + "to": [8, 19, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [-5, 17, 0]}, + "faces": { + "north": {"uv": [6, 4.25, 3.25, 4.75], "texture": "#0"}, + "south": {"uv": [3.25, 4.25, 6, 4.75], "texture": "#0"}, + "west": {"uv": [3.25, 3.5, 6.25, 4], "texture": "#0"}, + "up": {"uv": [3.25, 5, 6, 8], "texture": "#0"} + } + }, + { + "from": [8, 0, 2], + "to": [19, 2, 14], + "rotation": {"angle": 0, "axis": "x", "origin": [-5, 1, 8]}, + "faces": { + "north": {"uv": [6, 4.25, 3.25, 4.75], "rotation": 180, "texture": "#0"}, + "east": {"uv": [3.25, 3.5, 6.25, 4], "rotation": 180, "texture": "#0"}, + "south": {"uv": [3.25, 4.25, 6, 4.75], "rotation": 180, "texture": "#0"}, + "down": {"uv": [3.25, 8.25, 6, 11.25], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [-3, 0, 2], + "to": [8, 2, 14], + "rotation": {"angle": 0, "axis": "x", "origin": [-5, 1, 8]}, + "faces": { + "north": {"uv": [3.25, 4.25, 6, 4.75], "rotation": 180, "texture": "#0"}, + "south": {"uv": [6, 4.25, 3.25, 4.75], "rotation": 180, "texture": "#0"}, + "west": {"uv": [3.25, 3.5, 6.25, 4], "rotation": 180, "texture": "#0"}, + "down": {"uv": [3.25, 8.25, 6, 11.25], "texture": "#0"} + } + }, + { + "from": [8, 17, 2], + "to": [19, 19, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 17, 8]}, + "faces": { + "north": {"uv": [3.25, 4.25, 6, 4.75], "texture": "#0"}, + "east": {"uv": [3.25, 3.5, 6.25, 4], "texture": "#0"}, + "south": {"uv": [6, 4.25, 3.25, 4.75], "texture": "#0"}, + "up": {"uv": [3.25, 5, 6, 8], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [-4, 4, -1], + "to": [-2, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [-3, 4, 0]}, + "faces": { + "north": {"uv": [9.75, 3.5, 12.5, 4], "rotation": 90, "texture": "#0"}, + "east": {"uv": [10.75, 7.75, 6.25, 5], "texture": "#0"}, + "south": {"uv": [9.75, 4, 12.5, 3.5], "rotation": 90, "texture": "#0"}, + "west": {"uv": [6.25, 5, 10.75, 7.75], "texture": "#0"} + } + }, + { + "from": [18, 4, -1], + "to": [20, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [19, 4, 0]}, + "faces": { + "north": {"uv": [12.5, 4, 9.75, 3.5], "rotation": 90, "texture": "#0"}, + "east": {"uv": [6.25, 5, 10.75, 7.75], "texture": "#0"}, + "south": {"uv": [9.75, 3.5, 12.5, 4], "rotation": 90, "texture": "#0"}, + "west": {"uv": [6.25, 5, 10.75, 7.75], "texture": "#0"} + } + }, + { + "from": [0, 4, -1], + "to": [0, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 4, 0]}, + "faces": { + "north": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "east": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "south": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "west": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "texture": "#0"} + } + }, + { + "from": [2, 4, -1], + "to": [2, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [3, 4, 0]}, + "faces": { + "north": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "east": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "south": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "west": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "texture": "#0"} + } + }, + { + "from": [4, 4, -1], + "to": [4, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 4, 0]}, + "faces": { + "north": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "east": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "south": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "west": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "texture": "#0"} + } + }, + { + "from": [5.9, 4, -1], + "to": [5.9, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [6.9, 4, 0]}, + "faces": { + "north": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "east": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "south": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "west": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "texture": "#0"} + } + }, + { + "from": [8, 4, -1], + "to": [8, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [9, 4, 0]}, + "faces": { + "north": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "east": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "south": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "west": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "texture": "#0"} + } + }, + { + "from": [10, 4, -1], + "to": [10, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [11, 4, 0]}, + "faces": { + "north": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "east": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "south": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "west": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "texture": "#0"} + } + }, + { + "from": [12, 4, -1], + "to": [12, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 4, 0]}, + "faces": { + "north": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "east": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "south": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "west": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "texture": "#0"} + } + }, + { + "from": [13.9, 4, -1], + "to": [13.9, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [14.9, 4, 0]}, + "faces": { + "north": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "east": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "south": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "west": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "texture": "#0"} + } + }, + { + "from": [16, 4, -1], + "to": [16, 15, 17], + "rotation": {"angle": 0, "axis": "y", "origin": [17, 4, 0]}, + "faces": { + "north": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "east": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "south": {"uv": [0, 0, 0, 11], "texture": "#0"}, + "west": {"uv": [8, 0, 12.5, 2.75], "texture": "#0"}, + "up": {"uv": [0, 0, 0, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 0, 16], "texture": "#0"} + } + }, + { + "from": [-8, 3, 2], + "to": [8, 16, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [23, 4, 0]}, + "faces": { + "north": {"uv": [7, 0, 3, 3.25], "texture": "#0"}, + "south": {"uv": [3, 0, 7, 3.25], "texture": "#0"}, + "west": {"uv": [0, 0, 3, 3.25], "texture": "#0"}, + "up": {"uv": [0, 3.25, 3, 7.25], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 3.25, 3, 7.25], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [8, 3, 2], + "to": [24, 16, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 4, 16]}, + "faces": { + "north": {"uv": [3, 0, 7, 3.25], "texture": "#0"}, + "east": {"uv": [3, 0, 0, 3.25], "texture": "#0"}, + "south": {"uv": [7, 0, 3, 3.25], "texture": "#0"}, + "up": {"uv": [0, 3.25, 3, 7.25], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 3.25, 3, 7.25], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [-3, 22, 5], + "to": [3, 23, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [-1, 20, 7]}, + "faces": { + "north": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "east": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "south": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "west": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "up": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"}, + "down": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"} + } + }, + { + "from": [-3, 24, 5], + "to": [3, 25, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [-1, 22, 7]}, + "faces": { + "north": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "east": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "south": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "west": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "up": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"}, + "down": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"} + } + }, + { + "from": [13, 22, 5], + "to": [19, 23, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 20, 7]}, + "faces": { + "north": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "east": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "south": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "west": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "up": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"}, + "down": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"} + } + }, + { + "from": [13, 20, 5], + "to": [19, 21, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 18, 7]}, + "faces": { + "north": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "east": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "south": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "west": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "up": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"}, + "down": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"} + } + }, + { + "from": [13, 24, 5], + "to": [19, 25, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 22, 7]}, + "faces": { + "north": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "east": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "south": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "west": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "up": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"}, + "down": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"} + } + }, + { + "from": [-3, 20, 5], + "to": [3, 21, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [-1, 18, 7]}, + "faces": { + "north": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "east": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "south": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "west": {"uv": [13.25, 0, 14.75, 0.25], "texture": "#0"}, + "up": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"}, + "down": {"uv": [13.25, 0, 14.75, 1.5], "texture": "#0"} + } + }, + { + "from": [-2, 19, 6], + "to": [2, 26, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [-1, 21, 7]}, + "faces": { + "north": {"uv": [15, 0, 16, 1.75], "texture": "#0"}, + "east": {"uv": [15, 0, 16, 1.75], "texture": "#0"}, + "south": {"uv": [15, 0, 16, 1.75], "texture": "#0"}, + "west": {"uv": [15, 0, 16, 1.75], "texture": "#0"}, + "up": {"uv": [15, 2.5, 16, 3.5], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + }, + { + "from": [14, 19, 6], + "to": [18, 26, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 21, 7]}, + "faces": { + "north": {"uv": [15, 0, 16, 1.75], "texture": "#0"}, + "east": {"uv": [15, 0, 16, 1.75], "texture": "#0"}, + "south": {"uv": [15, 0, 16, 1.75], "texture": "#0"}, + "west": {"uv": [15, 0, 16, 1.75], "texture": "#0"}, + "up": {"uv": [15, 2.5, 16, 3.5], "texture": "#0"}, + "down": {"uv": [0, 0, 1, 1], "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/models/block/large_transformer/meow.json b/src/main/resources/assets/tfmg/models/block/large_transformer/meow.json new file mode 100644 index 00000000..f80049d0 --- /dev/null +++ b/src/main/resources/assets/tfmg/models/block/large_transformer/meow.json @@ -0,0 +1,47 @@ +{ + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "textures": { + "0": "tfmg:block/large_coil_top", + "1": "tfmg:block/large_coil_side", + "2": "tfmg:block/transformer_core", + "particle": "tfmg:block/large_coil_top" + }, + "elements": [ + { + "from": [0, 4, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 8]}, + "faces": { + "north": {"uv": [0, 0, 16, 12], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 12], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 12], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 12], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#0"} + } + }, + { + "from": [4, 0, 0], + "to": [12, 4, 12], + "rotation": {"angle": -180, "axis": "y", "origin": [8, 2, 8]}, + "faces": { + "east": {"uv": [4, 2, 16, 6], "texture": "#2"}, + "south": {"uv": [0, 6, 4, 14], "rotation": 90, "texture": "#2"}, + "west": {"uv": [16, 2, 4, 6], "texture": "#2"}, + "down": {"uv": [4, 6, 16, 14], "rotation": 90, "texture": "#2"} + } + }, + { + "from": [4, 16, 0], + "to": [12, 20, 12], + "rotation": {"angle": -180, "axis": "y", "origin": [8, 2, 8]}, + "faces": { + "east": {"uv": [4, 2, 16, 6], "texture": "#2"}, + "south": {"uv": [4, 6, 0, 14], "rotation": 90, "texture": "#2"}, + "west": {"uv": [16, 2, 4, 6], "texture": "#2"}, + "up": {"uv": [16, 6, 4, 14], "rotation": 90, "texture": "#2"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/tfmg/textures/block/copper_coil.png b/src/main/resources/assets/tfmg/textures/block/copper_coil.png deleted file mode 100644 index 42764cdf..00000000 Binary files a/src/main/resources/assets/tfmg/textures/block/copper_coil.png and /dev/null differ diff --git a/src/main/resources/assets/tfmg/textures/block/copper_coil_top.png b/src/main/resources/assets/tfmg/textures/block/copper_coil_top.png deleted file mode 100644 index 1e58792f..00000000 Binary files a/src/main/resources/assets/tfmg/textures/block/copper_coil_top.png and /dev/null differ diff --git a/src/main/resources/assets/tfmg/textures/block/laminated_magnetic_alloy_block.png b/src/main/resources/assets/tfmg/textures/block/laminated_magnetic_alloy_block.png new file mode 100644 index 00000000..06b64664 Binary files /dev/null and b/src/main/resources/assets/tfmg/textures/block/laminated_magnetic_alloy_block.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/large_coil_side.png b/src/main/resources/assets/tfmg/textures/block/large_coil_side.png new file mode 100644 index 00000000..546e367d Binary files /dev/null and b/src/main/resources/assets/tfmg/textures/block/large_coil_side.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/large_coil_top.png b/src/main/resources/assets/tfmg/textures/block/large_coil_top.png new file mode 100644 index 00000000..4c889ba5 Binary files /dev/null and b/src/main/resources/assets/tfmg/textures/block/large_coil_top.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/large_switch.png b/src/main/resources/assets/tfmg/textures/block/large_switch.png new file mode 100644 index 00000000..36328cf9 Binary files /dev/null and b/src/main/resources/assets/tfmg/textures/block/large_switch.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/large_transformer.png b/src/main/resources/assets/tfmg/textures/block/large_transformer.png index 4721b789..f2567a95 100644 Binary files a/src/main/resources/assets/tfmg/textures/block/large_transformer.png and b/src/main/resources/assets/tfmg/textures/block/large_transformer.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/transformer_core.png b/src/main/resources/assets/tfmg/textures/block/transformer_core.png new file mode 100644 index 00000000..0a5428f7 Binary files /dev/null and b/src/main/resources/assets/tfmg/textures/block/transformer_core.png differ diff --git a/src/main/resources/assets/tfmg/textures/item/bread.png b/src/main/resources/assets/tfmg/textures/item/bread.png new file mode 100644 index 00000000..b59b861b Binary files /dev/null and b/src/main/resources/assets/tfmg/textures/item/bread.png differ diff --git a/src/main/resources/assets/tfmg/textures/item/magnetic_alloy_sheet.png b/src/main/resources/assets/tfmg/textures/item/magnetic_alloy_sheet.png new file mode 100644 index 00000000..5a400568 Binary files /dev/null and b/src/main/resources/assets/tfmg/textures/item/magnetic_alloy_sheet.png differ