├── src ├── main │ ├── resources │ │ ├── logo.png │ │ ├── assets │ │ │ ├── mechano │ │ │ │ ├── models │ │ │ │ │ └── block │ │ │ │ │ │ ├── catenary │ │ │ │ │ │ └── hookup.json │ │ │ │ │ │ ├── tool_forge.json │ │ │ │ │ │ ├── rotor │ │ │ │ │ │ └── big_rotor_dummy │ │ │ │ │ │ │ └── base.json │ │ │ │ │ │ ├── tool_station │ │ │ │ │ │ └── dummy.json │ │ │ │ │ │ ├── test_block │ │ │ │ │ │ └── cube.json │ │ │ │ │ │ ├── diagonal_girder │ │ │ │ │ │ ├── partials │ │ │ │ │ │ │ ├── short_up_flat.json │ │ │ │ │ │ │ ├── long_up_flat.json │ │ │ │ │ │ │ ├── short_down_vert.json │ │ │ │ │ │ │ ├── short_up_vert.json │ │ │ │ │ │ │ ├── short_down_flat.json │ │ │ │ │ │ │ ├── long_down_vert.json │ │ │ │ │ │ │ ├── long_up_vert.json │ │ │ │ │ │ │ └── long_down_flat.json │ │ │ │ │ │ ├── middle.json │ │ │ │ │ │ ├── long_double.json │ │ │ │ │ │ ├── long_end_down.json │ │ │ │ │ │ ├── long_end_up.json │ │ │ │ │ │ ├── short_double.json │ │ │ │ │ │ ├── short_end_down.json │ │ │ │ │ │ ├── short_end_up.json │ │ │ │ │ │ └── item.json │ │ │ │ │ │ ├── generic │ │ │ │ │ │ ├── chevron_cutout.json │ │ │ │ │ │ └── chevron_cutout_2.json │ │ │ │ │ │ ├── voltometer │ │ │ │ │ │ └── needle.json │ │ │ │ │ │ ├── stator │ │ │ │ │ │ └── small_stator │ │ │ │ │ │ │ ├── hitbox │ │ │ │ │ │ │ ├── corner_middle.json │ │ │ │ │ │ │ ├── base_middle.json │ │ │ │ │ │ │ ├── base_end_a.json │ │ │ │ │ │ │ ├── base_end_b.json │ │ │ │ │ │ │ ├── base_single.json │ │ │ │ │ │ │ ├── corner_end_a.json │ │ │ │ │ │ │ └── corner_end_b.json │ │ │ │ │ │ │ ├── base_middle.json │ │ │ │ │ │ │ ├── base_middle_side.json │ │ │ │ │ │ │ └── base_end_a.json │ │ │ │ │ │ └── test_axis │ │ │ │ │ │ ├── base.json │ │ │ │ │ │ ├── cube.json │ │ │ │ │ │ └── base_side.json │ │ │ │ ├── sounds │ │ │ │ │ ├── cable_create.ogg │ │ │ │ │ ├── connector_click_up.ogg │ │ │ │ │ ├── connector_click_deny.ogg │ │ │ │ │ └── connector_click_down.ogg │ │ │ │ ├── textures │ │ │ │ │ ├── block │ │ │ │ │ │ ├── axis.png │ │ │ │ │ │ ├── chev.png │ │ │ │ │ │ ├── debug_red.png │ │ │ │ │ │ ├── stator │ │ │ │ │ │ │ ├── big.png │ │ │ │ │ │ │ └── base.png │ │ │ │ │ │ ├── voltometer.png │ │ │ │ │ │ ├── indrum_block.png │ │ │ │ │ │ ├── rotor │ │ │ │ │ │ │ ├── single.png │ │ │ │ │ │ │ └── single_large.png │ │ │ │ │ │ ├── catenary │ │ │ │ │ │ │ ├── hookup.png │ │ │ │ │ │ │ └── missing.png │ │ │ │ │ │ ├── diagonal_girder.png │ │ │ │ │ │ ├── test_axis │ │ │ │ │ │ │ ├── red.png │ │ │ │ │ │ │ └── tex.png │ │ │ │ │ │ ├── tool_station │ │ │ │ │ │ │ ├── base.png │ │ │ │ │ │ │ ├── forge.png │ │ │ │ │ │ │ ├── forged.png │ │ │ │ │ │ │ ├── heated.png │ │ │ │ │ │ │ └── maximized.png │ │ │ │ │ │ ├── connector │ │ │ │ │ │ │ └── connector.png │ │ │ │ │ │ └── slip_ring_shaft │ │ │ │ │ │ │ └── base.png │ │ │ │ │ └── item │ │ │ │ │ │ ├── spool_empty.png │ │ │ │ │ │ ├── wire_hookup.png │ │ │ │ │ │ ├── indrum_ingot.png │ │ │ │ │ │ ├── spool_hookup.png │ │ │ │ │ │ ├── spool_hookup_empty.png │ │ │ │ │ │ └── spool_hookup_depleted.png │ │ │ │ ├── sounds.json │ │ │ │ └── lang │ │ │ │ │ └── custom │ │ │ │ │ └── ui.json │ │ │ └── minecraft │ │ │ │ └── atlases │ │ │ │ └── blocks.json │ │ ├── pack.mcmeta │ │ ├── data │ │ │ └── mechano │ │ │ │ ├── structure │ │ │ │ └── empty.nbt │ │ │ │ └── hitboxes │ │ │ │ ├── test_axis.json │ │ │ │ └── connector │ │ │ │ └── connector_single.json │ │ ├── META-INF │ │ │ └── accesstransformer.cfg │ │ └── mechano.mixins.json │ ├── java-templates │ │ └── com │ │ │ └── quattage │ │ │ └── mechano │ │ │ └── MechanoBuildParameters.java.peb │ ├── java │ │ └── com │ │ │ └── quattage │ │ │ └── mechano │ │ │ ├── MechanoTags.java │ │ │ ├── MechanoPartials.java │ │ │ ├── foundation │ │ │ ├── numeric │ │ │ │ ├── VectorRotationRepresentable.java │ │ │ │ ├── ClientOnlySupplier.java │ │ │ │ ├── ExtendedCodecs.java │ │ │ │ ├── Duo.java │ │ │ │ └── EsoMath.java │ │ │ ├── block │ │ │ │ ├── hitbox │ │ │ │ │ ├── HitboxRepresentable.java │ │ │ │ │ └── MechanoHitboxes.java │ │ │ │ ├── orientation │ │ │ │ │ ├── OrientationUpdatable.java │ │ │ │ │ ├── RelativeDirection.java │ │ │ │ │ └── Relative.java │ │ │ │ ├── ConnectorHostOverridable.java │ │ │ │ ├── CircleGetter.java │ │ │ │ ├── ShapeGetter.java │ │ │ │ ├── SimpleOrientedBlock.java │ │ │ │ └── VerticallyOrientedBlock.java │ │ │ ├── mixin │ │ │ │ ├── client │ │ │ │ │ ├── accessor │ │ │ │ │ │ ├── PlayerInfoAccessor.java │ │ │ │ │ │ └── RenderBuffersAccessor.java │ │ │ │ │ ├── ItemInHandRendererInvoker.java │ │ │ │ │ └── ItemInHandRendererMixin.java │ │ │ │ └── MechanoMixins.java │ │ │ ├── LeftClickCapturable.java │ │ │ ├── item │ │ │ │ └── MechanoItemProperties.java │ │ │ ├── CreativeTabOverridable.java │ │ │ ├── MechanoRegistrate.java │ │ │ └── tracking │ │ │ │ └── GridIdentifiable.java │ │ │ ├── content │ │ │ ├── spool │ │ │ │ ├── EmptySpoolItem.java │ │ │ │ └── HookupSpoolItem.java │ │ │ └── connector │ │ │ │ ├── ConnectorBlockEntity.java │ │ │ │ ├── SingleConnectorBlockEntity.java │ │ │ │ └── SingleConnectorBlock.java │ │ │ ├── MechanoEntities.java │ │ │ ├── MechanoSounds.java │ │ │ ├── api │ │ │ ├── grid │ │ │ │ ├── topology │ │ │ │ │ ├── CircuitProvider.java │ │ │ │ │ ├── CircuitComponentProvider.java │ │ │ │ │ └── vertex │ │ │ │ │ │ └── WireJack.java │ │ │ │ ├── functional │ │ │ │ │ ├── Passthrough.java │ │ │ │ │ ├── VoltageSource.java │ │ │ │ │ ├── Capacitor.java │ │ │ │ │ └── Resistor.java │ │ │ │ ├── Watt.java │ │ │ │ └── solver │ │ │ │ │ ├── NodeUnionSet.java │ │ │ │ │ └── NodalSolver.java │ │ │ ├── ClientGrid.java │ │ │ ├── transmitter │ │ │ │ ├── TransmitterEntry.java │ │ │ │ └── TransmitterFactory.java │ │ │ ├── blockEntity │ │ │ │ └── renderer │ │ │ │ │ ├── SimpleBlockEntityRenderer.java │ │ │ │ │ └── GriddableBlockEntityRenderer.java │ │ │ ├── switchboard │ │ │ │ ├── task │ │ │ │ │ ├── DummyTask.java │ │ │ │ │ ├── JointUnlinkTask.java │ │ │ │ │ └── GridDumpTask.java │ │ │ │ └── action │ │ │ │ │ └── GridTaskExecuteEvent.java │ │ │ └── catenary │ │ │ │ ├── MeshExtruder.java │ │ │ │ └── EntropyTracker.java │ │ │ ├── infrastructure │ │ │ ├── gametest │ │ │ │ ├── ElectricityTests.java │ │ │ │ └── DisjointSetTests.java │ │ │ ├── command │ │ │ │ ├── GridDumpCommand.java │ │ │ │ └── MechanoCommands.java │ │ │ └── datagen │ │ │ │ ├── SpoolDataProvider.java │ │ │ │ ├── MechanoDataGen.java │ │ │ │ ├── SimpleDataProvider.java │ │ │ │ └── DynamicStateGenerator.java │ │ │ ├── MechanoClient.java │ │ │ ├── MechanoBlockEntities.java │ │ │ ├── MechanoTransmitters.java │ │ │ ├── MechanoItems.java │ │ │ ├── MechanoBlocks.java │ │ │ ├── MechanoData.java │ │ │ ├── MechanoPackets.java │ │ │ └── MechanoGroups.java │ └── templates │ │ └── META-INF │ │ └── neoforge.mods.toml └── generated │ └── resources │ ├── .cache │ ├── 82b4a4fdfa8e298fd72741ab142103c4f0fa5f56 │ └── cd7babe69a67160d475a70a03dc769be764b5e61 │ ├── assets │ └── mechano │ │ ├── models │ │ └── item │ │ │ ├── connector_single.json │ │ │ ├── spool_empty.json │ │ │ ├── spool_hookup_full.json │ │ │ ├── spool_hookup_empty.json │ │ │ ├── spool_hookup_depleted.json │ │ │ └── spool_hookup.json │ │ └── lang │ │ ├── en_ud.json │ │ └── en_us.json │ └── data │ ├── minecraft │ └── tags │ │ └── block │ │ └── mineable │ │ └── pickaxe.json │ └── mechano │ └── loot_table │ └── blocks │ └── connector_single.json ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties └── java.gradle ├── .gitattributes ├── settings.gradle ├── .gitignore ├── README.md ├── .vscode ├── settings.json └── launch.json ├── .github └── workflows │ └── build.yml ├── gradle.properties └── gradlew.bat /src/main/resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/logo.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/generated/resources/.cache/82b4a4fdfa8e298fd72741ab142103c4f0fa5f56: -------------------------------------------------------------------------------- 1 | // 1.21.1 2025-11-12T18:10:43.1844226 hitbox 2 | -------------------------------------------------------------------------------- /src/generated/resources/assets/mechano/models/item/connector_single.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "mechano:block/connector_single/base" 3 | } -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/models/block/catenary/hookup.json: -------------------------------------------------------------------------------- 1 | { 2 | "texture": "mechano:textures/block/catenary/hookup" 3 | } -------------------------------------------------------------------------------- /src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "Mechano Resources", 4 | "pack_format": 15 5 | } 6 | } -------------------------------------------------------------------------------- /src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "mechano:connector_single" 4 | ] 5 | } -------------------------------------------------------------------------------- /src/main/resources/data/mechano/structure/empty.nbt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/data/mechano/structure/empty.nbt -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/sounds/cable_create.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/sounds/cable_create.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/axis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/axis.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/chev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/chev.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/sounds/connector_click_up.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/sounds/connector_click_up.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/debug_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/debug_red.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/stator/big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/stator/big.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/voltometer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/voltometer.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/item/spool_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/item/spool_empty.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/item/wire_hookup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/item/wire_hookup.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/sounds/connector_click_deny.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/sounds/connector_click_deny.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/sounds/connector_click_down.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/sounds/connector_click_down.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/indrum_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/indrum_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/rotor/single.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/rotor/single.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/stator/base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/stator/base.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/item/indrum_ingot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/item/indrum_ingot.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/item/spool_hookup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/item/spool_hookup.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/catenary/hookup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/catenary/hookup.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/diagonal_girder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/diagonal_girder.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/test_axis/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/test_axis/red.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/test_axis/tex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/test_axis/tex.png -------------------------------------------------------------------------------- /src/generated/resources/assets/mechano/models/item/spool_empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "mechano:item/spool_empty" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/catenary/missing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/catenary/missing.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/tool_station/base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/tool_station/base.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/item/spool_hookup_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/item/spool_hookup_empty.png -------------------------------------------------------------------------------- /src/generated/resources/assets/mechano/models/item/spool_hookup_full.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "mechano:item/spool_hookup" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/models/block/tool_forge.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "mechano:item/tool_forge" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/connector/connector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/connector/connector.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/rotor/single_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/rotor/single_large.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/slip_ring_shaft/base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/slip_ring_shaft/base.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/tool_station/forge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/tool_station/forge.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/tool_station/forged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/tool_station/forged.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/tool_station/heated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/tool_station/heated.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/item/spool_hookup_depleted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/item/spool_hookup_depleted.png -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/models/block/rotor/big_rotor_dummy/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "textures": { 4 | "particle": "mechano:block/rotor/single_large" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/textures/block/tool_station/maximized.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quattage/mechano/HEAD/src/main/resources/assets/mechano/textures/block/tool_station/maximized.png -------------------------------------------------------------------------------- /src/generated/resources/assets/mechano/models/item/spool_hookup_empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "mechano:item/spool_hookup_empty" 5 | } 6 | } -------------------------------------------------------------------------------- /src/generated/resources/assets/mechano/models/item/spool_hookup_depleted.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "mechano:item/spool_hookup_depleted" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/java-templates/com/quattage/mechano/MechanoBuildParameters.java.peb: -------------------------------------------------------------------------------- 1 | package com.quattage.mechano; 2 | 3 | public class MechanoBuildParameters { 4 | public static String VERSION = "{{ version }}"; 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/mechano/models/block/tool_station/dummy.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "texture_size": [16, 16], 4 | "textures": { 5 | "particle": "block/dark_oak_planks" 6 | } 7 | } -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/atlases/blocks.json: -------------------------------------------------------------------------------- 1 | { 2 | "sources": [ 3 | { 4 | "type": "directory", 5 | "source": "block/catenary", 6 | "prefix": "block/catenary/" 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /src/main/java/com/quattage/mechano/MechanoTags.java: -------------------------------------------------------------------------------- 1 | package com.quattage.mechano; 2 | 3 | import net.neoforged.bus.api.IEventBus; 4 | 5 | public class MechanoTags { 6 | public static void register(IEventBus modBus) { 7 | 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/quattage/mechano/MechanoPartials.java: -------------------------------------------------------------------------------- 1 | package com.quattage.mechano; 2 | 3 | import net.neoforged.bus.api.IEventBus; 4 | 5 | public class MechanoPartials { 6 | 7 | 8 | public static void register(IEventBus modBus) { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/quattage/mechano/foundation/numeric/VectorRotationRepresentable.java: -------------------------------------------------------------------------------- 1 | package com.quattage.mechano.foundation.numeric; 2 | 3 | import net.minecraft.core.Vec3i; 4 | 5 | public interface VectorRotationRepresentable { 6 | public abstract Vec3i getRotation(); 7 | } 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Disable autocrlf on generated files, they always generate with LF 2 | # Add any extra files or paths here to make git stop saying they 3 | # are changed when only line endings change. 4 | src/generated/**/.cache/cache text eol=lf 5 | src/generated/**/*.json text eol=lf 6 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | mavenLocal() 4 | gradlePluginPortal() 5 | maven { url = 'https://maven.neoforged.net/releases' } 6 | } 7 | } 8 | 9 | plugins { 10 | id 'org.gradle.toolchains.foojay-resolver-convention' version '0.9.0' 11 | } 12 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /src/main/java/com/quattage/mechano/content/spool/EmptySpoolItem.java: -------------------------------------------------------------------------------- 1 | package com.quattage.mechano.content.spool; 2 | 3 | import net.minecraft.world.item.Item; 4 | 5 | public class EmptySpoolItem extends Item { 6 | public EmptySpoolItem(Properties properties) { 7 | super(properties); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/quattage/mechano/MechanoEntities.java: -------------------------------------------------------------------------------- 1 | package com.quattage.mechano; 2 | 3 | import net.neoforged.bus.api.IEventBus; 4 | 5 | public class MechanoEntities { 6 | 7 | public static void register(IEventBus modBus) { 8 | Mechano.LOGGER.debug("registering block entities"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/quattage/mechano/MechanoSounds.java: -------------------------------------------------------------------------------- 1 | package com.quattage.mechano; 2 | 3 | import net.neoforged.bus.api.IEventBus; 4 | 5 | public class MechanoSounds { 6 | 7 | public static void register(IEventBus modBus) { 8 | // CatenaryAttributable.Soundscape.registerResources(); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # vs 2 | *.vscode 3 | 4 | # eclipse 5 | bin 6 | *.launch 7 | .settings 8 | .metadata 9 | .classpath 10 | .project 11 | 12 | # idea 13 | out 14 | *.ipr 15 | *.iws 16 | *.iml 17 | .idea 18 | 19 | # gradle 20 | build 21 | .gradle 22 | 23 | # other 24 | presskit 25 | eclipse 26 | run 27 | runs 28 | run-data 29 | 30 | repo -------------------------------------------------------------------------------- /src/main/resources/META-INF/accesstransformer.cfg: -------------------------------------------------------------------------------- 1 | public net.minecraft.client.multiplayer.ClientLevel entityStorage 2 | public net.minecraft.server.level.ChunkMap entityMap 3 | public net.minecraft.server.level.ChunkMap$TrackedEntity 4 | public net.minecraft.server.level.ChunkMap$TrackedEntity seenBy 5 | public net.minecraft.server.level.ServerLevel$EntityCallbacks -------------------------------------------------------------------------------- /src/main/java/com/quattage/mechano/api/grid/topology/CircuitProvider.java: -------------------------------------------------------------------------------- 1 | package com.quattage.mechano.api.grid.topology; 2 | 3 | 4 | 5 | /** 6 | * Indicates that this class instantiates/caches/provides some kind of 7 | * {@link CircuitComponent} object for use with the Grid API. 8 | */ 9 | public interface CircuitProvider { 10 | CircuitComponent getCircuit(); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/quattage/mechano/infrastructure/gametest/ElectricityTests.java: -------------------------------------------------------------------------------- 1 | package com.quattage.mechano.infrastructure.gametest; 2 | 3 | import com.quattage.mechano.Mechano; 4 | 5 | import net.neoforged.neoforge.gametest.GameTestHolder; 6 | import net.neoforged.neoforge.gametest.PrefixGameTestTemplate; 7 | 8 | @GameTestHolder(Mechano.ID) 9 | @PrefixGameTestTemplate(false) 10 | public class ElectricityTests { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | 4 | --- 5 | 6 |
Mechano provides a fundamental basis for the expansion Create’s conventions and systems into other mods in an extensible and customizible way.
start and end
12 | * @param start
13 | * @param end
14 | * @return
15 | */
16 | @Override
17 | @NonnullType T apply(@NonnullType WireJack t, @NonnullType WireJack u);
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/partials/short_up_flat.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [3, 11.5, 6],
11 | "to": [13.1, 16, 17],
12 | "rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
13 | "faces": {
14 | "north": {"uv": [0, 6, 5, 10], "texture": "#0"},
15 | "east": {"uv": [5, 6, 10.5, 10], "texture": "#0"},
16 | "south": {"uv": [0, 6, 5, 10], "texture": "#0"},
17 | "west": {"uv": [5, 6, 10.5, 10], "texture": "#0"},
18 | "up": {"uv": [10.5, 6, 16, 16], "rotation": 270, "texture": "#0"},
19 | "down": {"uv": [10.5, 6, 16, 16], "rotation": 270, "texture": "#0"}
20 | }
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/generated/resources/assets/mechano/models/item/spool_hookup.json:
--------------------------------------------------------------------------------
1 | {
2 | "parent": "minecraft:item/generated",
3 | "overrides": [
4 | {
5 | "model": "mechano:item/spool_empty",
6 | "predicate": {
7 | "mechano:full": 0.0
8 | }
9 | },
10 | {
11 | "model": "mechano:item/spool_hookup_empty",
12 | "predicate": {
13 | "mechano:full": 0.1
14 | }
15 | },
16 | {
17 | "model": "mechano:item/spool_hookup_depleted",
18 | "predicate": {
19 | "mechano:full": 0.5
20 | }
21 | },
22 | {
23 | "model": "mechano:item/spool_hookup_full",
24 | "predicate": {
25 | "mechano:full": 0.75
26 | }
27 | },
28 | {
29 | "model": "mechano:item/spool_hookup_full",
30 | "predicate": {
31 | "mechano:full": 0.999
32 | }
33 | }
34 | ]
35 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/middle.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [5, -3.35, 5],
11 | "to": [11, 19.35, 11],
12 | "rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]},
13 | "faces": {
14 | "north": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
15 | "east": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
16 | "south": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
17 | "west": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
18 | "up": {"uv": [0, 0, 3, 6], "texture": "#0"},
19 | "down": {"uv": [0, 0, 3, 6], "texture": "#0"}
20 | }
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/long_double.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [5, -6.35, 5],
11 | "to": [11, 22.35, 11],
12 | "rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]},
13 | "faces": {
14 | "north": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
15 | "east": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
16 | "south": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
17 | "west": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
18 | "up": {"uv": [0, 0, 3, 6], "texture": "#0"},
19 | "down": {"uv": [0, 0, 3, 6], "texture": "#0"}
20 | }
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/long_end_down.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [5, -3.35, 5],
11 | "to": [11, 22.35, 11],
12 | "rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]},
13 | "faces": {
14 | "north": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
15 | "east": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
16 | "south": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
17 | "west": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
18 | "up": {"uv": [0, 0, 3, 6], "texture": "#0"},
19 | "down": {"uv": [0, 0, 3, 6], "texture": "#0"}
20 | }
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/long_end_up.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [5, -6.35, 5],
11 | "to": [11, 19.35, 11],
12 | "rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]},
13 | "faces": {
14 | "north": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
15 | "east": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
16 | "south": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
17 | "west": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
18 | "up": {"uv": [0, 0, 3, 6], "texture": "#0"},
19 | "down": {"uv": [0, 0, 3, 6], "texture": "#0"}
20 | }
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/short_double.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [5, 0.65, 5],
11 | "to": [11, 15.35, 11],
12 | "rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]},
13 | "faces": {
14 | "north": {"uv": [3, 0, 10.35, 6], "rotation": 90, "texture": "#0"},
15 | "east": {"uv": [3.15, 0, 10.5, 6], "rotation": 90, "texture": "#0"},
16 | "south": {"uv": [3, 0, 10.35, 6], "rotation": 90, "texture": "#0"},
17 | "west": {"uv": [3.15, 0, 10.5, 6], "rotation": 90, "texture": "#0"},
18 | "up": {"uv": [0, 0, 3, 6], "texture": "#0"},
19 | "down": {"uv": [0, 0, 3, 6], "texture": "#0"}
20 | }
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/short_end_down.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [5, -3.35, 5],
11 | "to": [11, 15.35, 11],
12 | "rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]},
13 | "faces": {
14 | "north": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
15 | "east": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
16 | "south": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
17 | "west": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
18 | "up": {"uv": [0, 0, 3, 6], "texture": "#0"},
19 | "down": {"uv": [0, 0, 3, 6], "texture": "#0"}
20 | }
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/short_end_up.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [5, 0.65, 5],
11 | "to": [11, 19.35, 11],
12 | "rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]},
13 | "faces": {
14 | "north": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
15 | "east": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
16 | "south": {"uv": [3, 0, 14.35, 6], "rotation": 90, "texture": "#0"},
17 | "west": {"uv": [3.15, 0, 14.5, 6], "rotation": 90, "texture": "#0"},
18 | "up": {"uv": [0, 0, 3, 6], "texture": "#0"},
19 | "down": {"uv": [0, 0, 3, 6], "texture": "#0"}
20 | }
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/partials/long_up_flat.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [3, 16, 10.75],
11 | "to": [13.1, 20.5, 21.75],
12 | "rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
13 | "color": 2,
14 | "faces": {
15 | "north": {"uv": [0, 6, 5, 10], "texture": "#0"},
16 | "east": {"uv": [5, 6, 10.5, 10], "texture": "#0"},
17 | "south": {"uv": [0, 6, 5, 10], "texture": "#0"},
18 | "west": {"uv": [5, 6, 10.5, 10], "texture": "#0"},
19 | "up": {"uv": [10.5, 6, 16, 16], "rotation": 270, "texture": "#0"},
20 | "down": {"uv": [10.5, 6, 16, 16], "rotation": 270, "texture": "#0"}
21 | }
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/src/main/java/com/quattage/mechano/MechanoBlockEntities.java:
--------------------------------------------------------------------------------
1 | package com.quattage.mechano;
2 |
3 | import com.quattage.mechano.api.blockEntity.renderer.GriddableBlockEntityRenderer;
4 | import com.quattage.mechano.content.connector.SingleConnectorBlockEntity;
5 | import com.tterrag.registrate.util.entry.BlockEntityEntry;
6 |
7 | import net.neoforged.bus.api.IEventBus;
8 |
9 | public class MechanoBlockEntities {
10 |
11 | public static final BlockEntityEntrytrue if vanilla left click behaviour with this
20 | * item should be cancelled in favor of the implementation in this method.
21 | */
22 | abstract boolean onLeftClick(Player player, ItemStack stack, InteractionHand hand);
23 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/partials/long_down_vert.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [3.1, -5.5, -4.85],
11 | "to": [13.2, 5.5, -0.35],
12 | "rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
13 | "color": 2,
14 | "faces": {
15 | "north": {"uv": [10.5, 6, 16, 16], "rotation": 90, "texture": "#0"},
16 | "east": {"uv": [5, 6, 10.5, 10], "rotation": 90, "texture": "#0"},
17 | "south": {"uv": [10.5, 6, 16, 16], "rotation": 270, "texture": "#0"},
18 | "west": {"uv": [5, 6, 10.5, 10], "rotation": 270, "texture": "#0"},
19 | "up": {"uv": [0, 6, 5, 10], "texture": "#0"},
20 | "down": {"uv": [0, 6, 5, 10], "rotation": 180, "texture": "#0"}
21 | }
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/partials/long_up_vert.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [3.1, 10.5, 16.35],
11 | "to": [13.2, 21.5, 20.85],
12 | "rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
13 | "color": 2,
14 | "faces": {
15 | "north": {"uv": [10.5, 6, 16, 16], "rotation": 90, "texture": "#0"},
16 | "east": {"uv": [5, 6, 10.5, 10], "rotation": 270, "texture": "#0"},
17 | "south": {"uv": [10.5, 6, 16, 16], "rotation": 270, "texture": "#0"},
18 | "west": {"uv": [5, 6, 10.5, 10], "rotation": 90, "texture": "#0"},
19 | "up": {"uv": [0, 6, 5, 10], "rotation": 180, "texture": "#0"},
20 | "down": {"uv": [0, 6, 5, 10], "texture": "#0"}
21 | }
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/diagonal_girder/partials/long_down_flat.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 16],
4 | "textures": {
5 | "0": "mechano:block/diagonal_girder",
6 | "particle": "mechano:block/diagonal_girder"
7 | },
8 | "elements": [
9 | {
10 | "from": [3, -4.5, -5.75],
11 | "to": [13.1, 0, 5.25],
12 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
13 | "color": 2,
14 | "faces": {
15 | "north": {"uv": [0, 6, 5, 10], "rotation": 180, "texture": "#0"},
16 | "east": {"uv": [5, 6, 10.5, 10], "rotation": 180, "texture": "#0"},
17 | "south": {"uv": [0, 6, 5, 10], "rotation": 180, "texture": "#0"},
18 | "west": {"uv": [5, 6, 10.5, 10], "rotation": 180, "texture": "#0"},
19 | "up": {"uv": [10.5, 6, 16, 16], "rotation": 270, "texture": "#0"},
20 | "down": {"uv": [10.5, 6, 16, 16], "rotation": 270, "texture": "#0"}
21 | }
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/src/main/java/com/quattage/mechano/foundation/numeric/ClientOnlySupplier.java:
--------------------------------------------------------------------------------
1 | package com.quattage.mechano.foundation.numeric;
2 |
3 | import java.util.function.Supplier;
4 |
5 | import org.jetbrains.annotations.NotNull;
6 | import org.jetbrains.annotations.Nullable;
7 |
8 | import net.neoforged.api.distmarker.Dist;
9 | import net.neoforged.api.distmarker.OnlyIn;
10 |
11 | /**
12 | * A LazySupplier which can only be accessed on the client
13 | */
14 | public class ClientOnlySupplier
15 | * Implement your own logic here to determine whether or not your block
16 | * can host a connector.
17 | * @param world World to operate within
18 | * @param connectorPos Position of the connector that called this method
19 | * @param connectorState BlockState of the connector that called this method
20 | * @param thisPos Position of this block
21 | * @param thisState BlockState of this block
22 | * @return
23 | */
24 | abstract boolean isConnectorAllowed(LevelReader world, BlockPos connectorPos, BlockState connectorState, BlockPos thisPos, BlockState thisState);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/quattage/mechano/foundation/mixin/MechanoMixins.java:
--------------------------------------------------------------------------------
1 | package com.quattage.mechano.foundation.mixin;
2 |
3 | import java.util.List;
4 | import java.util.Set;
5 |
6 | import org.objectweb.asm.tree.ClassNode;
7 | import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
8 | import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
9 |
10 | public class MechanoMixins implements IMixinConfigPlugin {
11 |
12 | @Override
13 | public void onLoad(String mixinPackage) {
14 |
15 | }
16 |
17 | @Override
18 | public String getRefMapperConfig() {
19 | return null;
20 | }
21 |
22 | @Override
23 | public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
24 | return true;
25 | }
26 |
27 | @Override
28 | public void acceptTargets(Set
18 | *
53 | * For API users: Use {@link #getUUIDSafe() the checked version}
54 | * of this method instead.
55 | * @return The UUID associated with this identifiable object.
56 | * @see #getUUIDSafe()
57 | */
58 | T getUUID();
59 |
60 | /**
61 | * Provides a (new or pre-existing) {@link GridUUID} instance
62 | * that points towards this object. Can be used by the {@link Grid}
63 | * to look this object up.
64 | * This method will throw exceptions for null or invalid returns.
65 | * @return The UUID associated with this identifiable object. Will never be
34 | * This is done in the renderer for a few reasons:
35 | * MechanoGroups.BASE
12 | * by default.
13 | */
14 | public interface CreativeTabOverridable {
15 |
16 | /***
17 | * Define an overridden creative mode tab to put this block/item into.
18 | * @return A DeferredHolder registry object containing the tab's registry, or null if
19 | * this block/item shouldn't appear in the creative menu at all.
20 | */
21 | public default @Nullable DeferredHoldertrue if the provided item belongs to the tab
31 | */
32 | public static boolean belongsTo(Item item, DeferredHolderRemember to tag implementations with
19 | * @OnlyIn(Dist.CLIENT)
20 | * @param world world to operate whithin
21 | * @param target the {@link AncillaryNode} currently targeted by the {@link Minecraft#player local player}
22 | * @return A {@link GridAction action}
23 | */
24 | @OnlyIn(Dist.CLIENT)
25 | default GridAction evaluateTarget(ClientLevel world, AncillaryNode target) {
26 | return GridAction.RESPONSE_SUCCESS;
27 | }
28 |
29 | /**
30 | * Gets the CircuitComponent associated with this object, and throws errors if anything goes wrong.
31 | * @return A new CircuitComponent instance constructed by this object.
32 | */
33 | default CircuitComponent getComponentSafe() {
34 | CircuitComponent output = null;
35 | try { output = getComponent(); }
36 | catch(RuntimeException e) {
37 | e.printStackTrace();
38 | throw new CircuitComponentProviderException(this, "Construction failed! (see exception above)");
39 | }
40 | if(output == null)
41 | throw new CircuitComponentProviderException(this, "Construction failed (factory returned null)");
42 | return output;
43 | }
44 |
45 | CircuitComponent getComponent();
46 |
47 | public static class CircuitComponentProviderException extends RuntimeException {
48 | public CircuitComponentProviderException(Object source, String message) {
49 | super("Failed while getting CircuitComponent from '" + source.getClass().getSimpleName()
50 | + ((message == null || message.isEmpty()) ? "" : ("' - " + message)));
51 | }
52 | public CircuitComponentProviderException(Object source) {
53 | super("Failed while getting CircuitComponent from '" + source.getClass().getSimpleName());
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/stator/small_stator/hitbox/base_single.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "elements": [
4 | {
5 | "from": [0, 0, 1],
6 | "to": [16, 7, 15],
7 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
8 | "faces": {
9 | "north": {"uv": [0, 53, 16, 60], "texture": "#missing"},
10 | "east": {"uv": [0, 0, 14, 7], "texture": "#missing"},
11 | "south": {"uv": [0, 53, 16, 60], "texture": "#missing"},
12 | "west": {"uv": [0, 0, 14, 7], "texture": "#missing"},
13 | "up": {"uv": [15, 64, 1, 48], "rotation": 90, "texture": "#missing"},
14 | "down": {"uv": [14, 6, 0, 22], "rotation": 90, "texture": "#missing"}
15 | }
16 | },
17 | {
18 | "from": [6, 4, 0],
19 | "to": [10, 7, 16],
20 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
21 | "faces": {
22 | "north": {"uv": [26, 48, 30, 51], "texture": "#missing"},
23 | "east": {"uv": [16, 48, 19, 64], "rotation": 90, "texture": "#missing"},
24 | "south": {"uv": [26, 51, 30, 48], "texture": "#missing"},
25 | "west": {"uv": [22, 48, 25, 64], "rotation": 90, "texture": "#missing"},
26 | "down": {"uv": [16, 48, 20, 64], "texture": "#missing"}
27 | }
28 | },
29 | {
30 | "from": [0, 7, 4],
31 | "to": [3, 9, 12],
32 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
33 | "faces": {
34 | "north": {"uv": [10, 64, 12, 61], "rotation": 90, "texture": "#missing"},
35 | "south": {"uv": [4, 61, 6, 64], "rotation": 90, "texture": "#missing"},
36 | "west": {"uv": [4, 62, 12, 64], "texture": "#missing"},
37 | "up": {"uv": [4, 61, 12, 64], "rotation": 90, "texture": "#missing"}
38 | }
39 | },
40 | {
41 | "from": [3, 7, 0],
42 | "to": [13, 10, 16],
43 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
44 | "faces": {
45 | "north": {"uv": [26, 48, 36, 51], "texture": "#missing"},
46 | "east": {"uv": [22, 48, 25, 64], "rotation": 90, "texture": "#missing"},
47 | "south": {"uv": [26, 48, 36, 51], "texture": "#missing"},
48 | "west": {"uv": [16, 48, 19, 64], "rotation": 90, "texture": "#missing"},
49 | "up": {"uv": [16, 48, 26, 64], "texture": "#missing"},
50 | "down": {"uv": [16, 48, 26, 64], "texture": "#missing"}
51 | }
52 | },
53 | {
54 | "from": [13, 7, 4],
55 | "to": [16, 9, 12],
56 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
57 | "faces": {
58 | "north": {"uv": [10, 51, 12, 48], "rotation": 90, "texture": "#missing"},
59 | "east": {"uv": [4, 50, 12, 48], "texture": "#missing"},
60 | "south": {"uv": [4, 48, 6, 51], "rotation": 90, "texture": "#missing"},
61 | "up": {"uv": [4, 51, 12, 48], "rotation": 270, "texture": "#missing"}
62 | }
63 | }
64 | ]
65 | }
--------------------------------------------------------------------------------
/src/main/java/com/quattage/mechano/api/catenary/MeshExtruder.java:
--------------------------------------------------------------------------------
1 | package com.quattage.mechano.api.catenary;
2 |
3 | import org.jetbrains.annotations.Nullable;
4 |
5 | import com.mojang.blaze3d.vertex.PoseStack.Pose;
6 | import com.mojang.blaze3d.vertex.VertexConsumer;
7 | import com.quattage.mechano.api.catenary.Catenaries.Stick;
8 |
9 | import net.neoforged.api.distmarker.Dist;
10 | import net.neoforged.api.distmarker.OnlyIn;
11 |
12 | /**
13 | * Allows API users to define unique meshing behaviour
14 | * for catenaries. Instances should provide
15 | * a unique implementation of the {@link #extrude} method.
16 | */
17 | @FunctionalInterface
18 | @OnlyIn(Dist.CLIENT)
19 | public interface MeshExtruder {
20 | /**
21 | * Defines a method for lofting a profile across a given
22 | * {@link Stick}. Implementations can define unique topology,
23 | * lighting, and normal behaviours for the resulting geometry.
24 | * The stick, called current, has 4 or more
25 | * vertices placed at each of its endpoints. The offset
26 | * positions of these vertices are averaged across the
27 | * adjacent sticks, previous and
28 | * next, so that adjacent profiles line up
29 | * exactly at their ends. Alternatively, endpoint averaging
30 | * can be ignored by simply passing null in
31 | * place of either adjacent stick.
32 | * @param buffer VertexConsumer to push geometry to
33 | * @param pose Pose to use for transforming
34 | * @param geo {@link CatenaryMeshBuffer} to store and process vertex data. You don't actually have to use this if you don't want to - it's a helper that aids in emiting quads based on stick dimensions quickly.
35 | * @param previous (Optional, can be null) The previous stick in the chain
36 | * @param current (Required) The stick to create a profile of
37 | * @param next (Optional, can be null) The next stick in the chain
38 | * @param loftLength An arbitrary float representing the total arclength covered during successive calls to this method.
39 | * Useful for when multiple extrusions are created in one mesh and need to distinguish between one another or for
40 | * panning UVs across an atlas.
41 | * @param recomputeNormals true if new face normals should be computed here. If false,
42 | * the normals contained in geo will not be recomputed, but reused.
43 | * @param pTicks Partial ticks (accessible in most rendering contexts) for lerping from a fixed update cycle.
44 | */
45 | void extrude(VertexConsumer buffer, Pose pose, CatenaryMeshBuffer geo, @Nullable Stick previous, Stick current, @Nullable Stick next, float loftLength, boolean recomputeNormals, float pTicks);
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/com/quattage/mechano/foundation/block/CircleGetter.java:
--------------------------------------------------------------------------------
1 | package com.quattage.mechano.foundation.block;
2 |
3 | import java.util.function.Function;
4 |
5 | import net.createmod.catnip.placement.PlacementOffset;
6 | import net.minecraft.core.BlockPos;
7 | import net.minecraft.core.Direction.Axis;
8 |
9 | public class CircleGetter extends ShapeGetter {
10 |
11 | public CircleGetter(Integer radius, Axis axis, BlockPos centerPos) {
12 | super(radius, axis, centerPos);
13 | }
14 |
15 | @Override
16 | protected PlacementOffset evalSafe(FunctionSTEP_LIMIT
25 | * or until the residual has been reduced to a value below
26 | * EPSILON
27 | * @param snapshot
28 | * @return FINISHED_SOLVED_EARLY or FINISH_SOLVED_LATE if convergence was reached, see {@link ConvergenceStatus}
29 | */
30 | default ConvergenceStatus solve(ServerGrid grid) {
31 | grid.setStatus(ConvergenceStatus.UNFINISHED_COMPUTING);
32 | ConvergenceStatus status = null;
33 | if(NodalSolver.profiler != null) {
34 | NodalSolver.profiler.start();
35 | status = run(grid);
36 | NodalSolver.profiler.reset();
37 | } else {
38 | status = run(grid);
39 | if(!status.indicatesSuccess())
40 | Mechano.LOGGER.warn("The active NodalSolver couldn't converge in " + NodalSolver.STEP_LIMIT + " iterations");
41 | }
42 | grid.setStatus(status);
43 | return status;
44 | }
45 |
46 | /**
47 | * Runs this solver until completeion, either
48 | * when the iteration limit exceeds STEP_LIMIT
49 | * or until the error has been reduced to a value below
50 | * EPSILON
51 | * @param snapshot
52 | * @return SOLVED if convergence was reached
53 | */
54 | ConvergenceStatus run(ServerGrid grid);
55 | void apply(Circuit circuit);
56 |
57 | /**
58 | * Used when a world is unloaded to ensure that the footprint of this solver is minimized.
59 | */
60 | void reset();
61 |
62 | public enum ConvergenceStatus implements StringRepresentable {
63 | FINISHED_SOLVED_EARLY(true),
64 | FINISHED_SOLVED_LATE(true),
65 | FINISHED_LIMIT_REACHED(false),
66 | UNFINISHED_PROBLEMATIC_DATA(false),
67 | UNFINISHED_COMPUTING(false),
68 | UNFINISHED_GENERIC_ERROR(false),
69 | UNFINISHED_UNPOPULATED(false);
70 | private final boolean success;
71 | ConvergenceStatus(boolean success) { this.success = success; }
72 | public boolean indicatesSuccess() { return success; }
73 | @Override public String getSerializedName() { return name().toLowerCase(Locale.ROOT); }
74 | @Override public String toString() { return getSerializedName(); }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/main/java/com/quattage/mechano/foundation/block/VerticallyOrientedBlock.java:
--------------------------------------------------------------------------------
1 | package com.quattage.mechano.foundation.block;
2 |
3 | import com.quattage.mechano.foundation.block.orientation.VerticalOrientation;
4 | import com.simibubi.create.content.equipment.wrench.IWrenchable;
5 | import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
6 |
7 | import net.minecraft.core.BlockPos;
8 | import net.minecraft.core.Direction;
9 | import net.minecraft.world.InteractionResult;
10 | import net.minecraft.world.item.context.BlockPlaceContext;
11 | import net.minecraft.world.item.context.UseOnContext;
12 | import net.minecraft.world.level.Level;
13 | import net.minecraft.world.level.block.Block;
14 | import net.minecraft.world.level.block.state.BlockState;
15 | import net.minecraft.world.level.block.state.StateDefinition;
16 | import net.minecraft.world.level.block.state.properties.EnumProperty;
17 | import net.minecraft.world.phys.Vec3;
18 |
19 | public class VerticallyOrientedBlock extends Block implements IWrenchable{
20 | public static final EnumPropertynull
66 | */
67 | @ApiStatus.NonExtendable
68 | default T getUUIDSafe() {
69 | T uuid = getUUID();
70 | if(uuid == null)
71 | throw new NullPointerException("GridIdentifiable '" + this.getClass().getSimpleName() + " failed to provide a vlaid UUID! (got " + uuid + ")");
72 | return uuid;
73 | }
74 |
75 | Griddable> getTargetSource(LevelReader world);
76 | }
77 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 | @rem SPDX-License-Identifier: Apache-2.0
17 | @rem
18 |
19 | @if "%DEBUG%"=="" @echo off
20 | @rem ##########################################################################
21 | @rem
22 | @rem Gradle startup script for Windows
23 | @rem
24 | @rem ##########################################################################
25 |
26 | @rem Set local scope for the variables with windows NT shell
27 | if "%OS%"=="Windows_NT" setlocal
28 |
29 | set DIRNAME=%~dp0
30 | if "%DIRNAME%"=="" set DIRNAME=.
31 | @rem This is normally unused
32 | set APP_BASE_NAME=%~n0
33 | set APP_HOME=%DIRNAME%
34 |
35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37 |
38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40 |
41 | @rem Find java.exe
42 | if defined JAVA_HOME goto findJavaFromJavaHome
43 |
44 | set JAVA_EXE=java.exe
45 | %JAVA_EXE% -version >NUL 2>&1
46 | if %ERRORLEVEL% equ 0 goto execute
47 |
48 | echo. 1>&2
49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50 | echo. 1>&2
51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52 | echo location of your Java installation. 1>&2
53 |
54 | goto fail
55 |
56 | :findJavaFromJavaHome
57 | set JAVA_HOME=%JAVA_HOME:"=%
58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59 |
60 | if exist "%JAVA_EXE%" goto execute
61 |
62 | echo. 1>&2
63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64 | echo. 1>&2
65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66 | echo location of your Java installation. 1>&2
67 |
68 | goto fail
69 |
70 | :execute
71 | @rem Setup the command line
72 |
73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
74 |
75 |
76 | @rem Execute Gradle
77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
78 |
79 | :end
80 | @rem End local scope for the variables with windows NT shell
81 | if %ERRORLEVEL% equ 0 goto mainEnd
82 |
83 | :fail
84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
85 | rem the _cmd.exe /c_ return code!
86 | set EXIT_CODE=%ERRORLEVEL%
87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89 | exit /b %EXIT_CODE%
90 |
91 | :mainEnd
92 | if "%OS%"=="Windows_NT" endlocal
93 |
94 | :omega
95 |
--------------------------------------------------------------------------------
/src/main/java/com/quattage/mechano/api/catenary/EntropyTracker.java:
--------------------------------------------------------------------------------
1 | package com.quattage.mechano.api.catenary;
2 |
3 | import org.joml.Vector3f;
4 |
5 | import com.quattage.mechano.api.catenary.model.CatenaryModel;
6 |
7 | /**
8 | * A helper class for determining whether or not a verlet-based
9 | * catenary simulation has reached a state of minimum potential
10 | * energy. This class is designed to be instantiated by
11 | * {@link CatenaryModel instances} for convenience.
12 | */
13 | public class EntropyTracker {
14 |
15 | // TODO this class is LOD unfriendly and a little expensive to store in every single catenary instance
16 |
17 | private int tick = 0;
18 | private float avgVelocity = 0f;
19 | private float previousAccumulatedError = 0;
20 | private float accumulatedError = 0;
21 |
22 | public EntropyTracker() {}
23 |
24 | public boolean isResting() {
25 | if(avgVelocity < Catenaries.renderPipeline().getRestitutionSpeed() && (Math.abs(accumulatedError - previousAccumulatedError) < Catenaries.renderPipeline().getRestitutionEpsilon())) {
26 | if(tick > 42) return true;
27 | tick++;
28 | return false;
29 | }
30 | tick = 0;
31 | return false;
32 | }
33 |
34 | public void accumulate(float error) {
35 | accumulatedError += error;
36 | }
37 |
38 | public void walk(float newError) {
39 | previousAccumulatedError = accumulatedError;
40 | accumulatedError = newError;
41 | }
42 |
43 | public void walk(float newError, int steps) {
44 | previousAccumulatedError = accumulatedError;
45 | accumulatedError = (newError / (float)(steps * Catenaries.renderPipeline().getSolverSteps()));
46 | this.avgVelocity /= (float)steps;
47 | }
48 |
49 | public void apply(Vector3f velocity) {
50 | this.avgVelocity += velocity.length();
51 | }
52 |
53 | /**
54 | * A catenary is considered to be cascading when it receives a change
55 | * in velocity that is too great, or if its accumulated constraint error
56 | * is too high. This can occur in cases where catenary simulations
57 | * become unstable or too long/complex, where they're unable to resolve
58 | * to a stable output. In cases like this, steps should be taken to ensure
59 | * that the catenary is removed from the world before it causes extreme
60 | * visual artifacts that are generally unpleasant, but may also affect
61 | * people with photosensitivity.
62 | * @return true if this EntropyTracker contains data that
63 | * suggests its instantiating catenary is cascading.
64 | */
65 | public boolean isCascading() {
66 | return avgVelocity > 1e10 || Float.isNaN(avgVelocity) || accumulatedError > 500;
67 | }
68 |
69 | public void softReset() {
70 | this.avgVelocity = 0;
71 | }
72 |
73 | public void reset() {
74 | this.avgVelocity = 0;
75 | this.tick = 0;
76 | this.previousAccumulatedError = 0;
77 | this.accumulatedError = 0;
78 | }
79 |
80 | @Override
81 | public String toString() {
82 | return "RestitutionTracker[" + avgVelocity + "m/t, " + accumulatedError + " :: " + tick + "t]";
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/src/main/java/com/quattage/mechano/api/blockEntity/renderer/GriddableBlockEntityRenderer.java:
--------------------------------------------------------------------------------
1 |
2 | package com.quattage.mechano.api.blockEntity.renderer;
3 |
4 | import com.mojang.blaze3d.vertex.PoseStack;
5 | import com.quattage.mechano.api.blockEntity.GriddableBlockEntity;
6 | import com.quattage.mechano.api.switchboard.JackSelector;
7 |
8 | import net.minecraft.client.Minecraft;
9 | import net.minecraft.client.player.LocalPlayer;
10 | import net.minecraft.client.renderer.MultiBufferSource;
11 | import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
12 | import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider.Context;
13 | import net.minecraft.world.entity.ai.attributes.Attributes;
14 | import net.minecraft.world.phys.AABB;
15 |
16 | public class GriddableBlockEntityRenderer
36 | *
40 | * The visibility and interaction status of each anchor is evaluated in the {@link AnchorSelector#INSTANCE Anchor Selector}
41 | * @param be
42 | */
43 | public void tickAnchors(LocalPlayer player, T be, double reach) {
44 | be.provideTerminus().forEach(joint -> {
45 | JackSelector.getInstance().trackForThisFrame(player, be, joint);
46 | });
47 | }
48 |
49 | // public void renderMovingWires(T be, MultiBufferSource bufferSource, PoseStack matrixStack, float pTicks) {
50 | // be.forEachCatenary(cat -> {
51 | // if(!WindManager.INSTANCE.isEnabled() && !cat.isMoving(be.getLevel())) return;
52 | // cat.render(be, bufferSource, matrixStack, pTicks);
53 | // });
54 | // }
55 |
56 | @Override
57 | public AABB getRenderBoundingBox(T be) {
58 | return be.getRenderBoundingBox();
59 | }
60 |
61 | // @Override
62 | // public boolean shouldRender(T be, Vec3 cameraPos) {
63 | // if(be.getSurrogate() != null && be.getSurrogate().isSynced()) return true;
64 | // return Vec3.atCenterOf(be.getBlockPos()).closerThan(cameraPos, (double)this.getViewDistance());
65 | // }
66 |
67 | // @Override
68 | // public boolean shouldRenderOffScreen(T be) {
69 | // return be.getSurrogate() != null && be.getSurrogate().isSynced();
70 | // }
71 | }
72 |
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/stator/small_stator/base_end_a.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [64, 64],
4 | "textures": {
5 | "0": "mechano:block/stator/base",
6 | "particle": "mechano:block/stator/base"
7 | },
8 | "elements": [
9 | {
10 | "from": [0, 0, 1],
11 | "to": [16, 7, 16],
12 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
13 | "faces": {
14 | "north": {"uv": [0, 13.25, 4, 15], "texture": "#0"},
15 | "east": {"uv": [7, 0, 3.25, 1.75], "texture": "#0"},
16 | "west": {"uv": [3.25, 0, 7, 1.75], "texture": "#0"},
17 | "up": {"uv": [3.75, 16, 0, 12], "rotation": 90, "texture": "#0"},
18 | "down": {"uv": [7, 1.5, 3.25, 5.5], "rotation": 90, "texture": "#0"}
19 | }
20 | },
21 | {
22 | "from": [0, 7, 4],
23 | "to": [3, 9, 12],
24 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
25 | "faces": {
26 | "north": {"uv": [2.5, 16, 3, 15.25], "rotation": 90, "texture": "#0"},
27 | "south": {"uv": [1, 15.25, 1.5, 16], "rotation": 90, "texture": "#0"},
28 | "west": {"uv": [1, 15.5, 3, 16], "texture": "#0"},
29 | "up": {"uv": [1, 15.25, 3, 16], "rotation": 90, "texture": "#0"}
30 | }
31 | },
32 | {
33 | "from": [13, 7, 4],
34 | "to": [16, 9, 12],
35 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
36 | "faces": {
37 | "north": {"uv": [2.5, 12.75, 3, 12], "rotation": 90, "texture": "#0"},
38 | "east": {"uv": [1, 12.5, 3, 12], "texture": "#0"},
39 | "south": {"uv": [1, 12, 1.5, 12.75], "rotation": 90, "texture": "#0"},
40 | "up": {"uv": [1, 12.75, 3, 12], "rotation": 270, "texture": "#0"}
41 | }
42 | },
43 | {
44 | "from": [3, 7, 0],
45 | "to": [13, 10, 16],
46 | "faces": {
47 | "north": {"uv": [6.5, 12, 9, 12.75], "texture": "#0"},
48 | "east": {"uv": [5.5, 12, 6.25, 16], "rotation": 90, "texture": "#0"},
49 | "west": {"uv": [4, 12, 4.75, 16], "rotation": 90, "texture": "#0"},
50 | "up": {"uv": [4, 12, 6.5, 16], "texture": "#0"},
51 | "down": {"uv": [4, 12, 6.5, 16], "texture": "#0"}
52 | }
53 | },
54 | {
55 | "from": [6, 4, 0],
56 | "to": [10, 7, 16],
57 | "faces": {
58 | "north": {"uv": [6.5, 12, 7.5, 12.75], "texture": "#0"},
59 | "east": {"uv": [4, 12, 4.75, 16], "rotation": 90, "texture": "#0"},
60 | "west": {"uv": [4, 12, 4.75, 16], "rotation": 90, "texture": "#0"},
61 | "down": {"uv": [4, 12, 5, 16], "texture": "#0"}
62 | }
63 | }
64 | ],
65 | "display": {
66 | "thirdperson_righthand": {
67 | "rotation": [75, 45, 0],
68 | "translation": [0, 2.5, 0],
69 | "scale": [0.375, 0.375, 0.375]
70 | },
71 | "thirdperson_lefthand": {
72 | "rotation": [75, 45, 0],
73 | "translation": [0, 2.5, 0],
74 | "scale": [0.375, 0.375, 0.375]
75 | },
76 | "firstperson_righthand": {
77 | "rotation": [0, 45, 0],
78 | "scale": [0.4, 0.4, 0.4]
79 | },
80 | "firstperson_lefthand": {
81 | "rotation": [0, 225, 0],
82 | "scale": [0.4, 0.4, 0.4]
83 | },
84 | "ground": {
85 | "translation": [0, 3, 0],
86 | "scale": [0.25, 0.25, 0.25]
87 | },
88 | "gui": {
89 | "rotation": [30, 225, 0],
90 | "scale": [0.625, 0.625, 0.625]
91 | },
92 | "head": {
93 | "translation": [0, 11, 0]
94 | },
95 | "fixed": {
96 | "scale": [0.5, 0.5, 0.5]
97 | }
98 | }
99 | }
--------------------------------------------------------------------------------
/src/main/resources/assets/mechano/models/block/test_axis/base_side.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "elements": [
4 | {
5 | "from": [0, 13, 1],
6 | "to": [5, 15, 3],
7 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
8 | "color": 3,
9 | "faces": {
10 | "north": {"uv": [0, 0, 2, 5], "rotation": 270, "texture": "#missing"},
11 | "east": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
12 | "south": {"uv": [0, 0, 2, 5], "rotation": 90, "texture": "#missing"},
13 | "west": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
14 | "up": {"uv": [0, 0, 2, 5], "rotation": 90, "texture": "#missing"},
15 | "down": {"uv": [0, 0, 2, 5], "rotation": 90, "texture": "#missing"}
16 | }
17 | },
18 | {
19 | "from": [0, 1, 13],
20 | "to": [2, 3, 15],
21 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
22 | "color": 5,
23 | "faces": {
24 | "north": {"uv": [0, 0, 2, 2], "rotation": 270, "texture": "#missing"},
25 | "east": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
26 | "south": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
27 | "west": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
28 | "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
29 | "down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"}
30 | }
31 | },
32 | {
33 | "from": [7, 7, 7],
34 | "to": [9, 9, 9],
35 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
36 | "color": 9,
37 | "faces": {
38 | "north": {"uv": [0, 0, 2, 2], "rotation": 270, "texture": "#missing"},
39 | "east": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
40 | "south": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
41 | "west": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
42 | "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
43 | "down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"}
44 | }
45 | },
46 | {
47 | "from": [10, 13, 13],
48 | "to": [12, 15, 15],
49 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
50 | "color": 6,
51 | "faces": {
52 | "north": {"uv": [0, 0, 2, 2], "rotation": 270, "texture": "#missing"},
53 | "east": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
54 | "south": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
55 | "west": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
56 | "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
57 | "down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"}
58 | }
59 | },
60 | {
61 | "from": [5, 1, 1],
62 | "to": [7, 3, 3],
63 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
64 | "color": 6,
65 | "faces": {
66 | "north": {"uv": [0, 0, 2, 2], "rotation": 270, "texture": "#missing"},
67 | "east": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
68 | "south": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
69 | "west": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
70 | "up": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"},
71 | "down": {"uv": [0, 0, 2, 2], "rotation": 90, "texture": "#missing"}
72 | }
73 | }
74 | ]
75 | }
--------------------------------------------------------------------------------
/src/main/resources/data/mechano/hitboxes/connector/connector_single.json:
--------------------------------------------------------------------------------
1 | {
2 | "credit": "Made with Blockbench",
3 | "texture_size": [32, 32],
4 | "elements": [
5 | {
6 | "from": [2, 0, 3],
7 | "to": [14, 4, 13],
8 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
9 | "color": 4,
10 | "faces": {
11 | "north": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#missing"},
12 | "east": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#missing"},
13 | "south": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#missing"},
14 | "west": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#missing"},
15 | "up": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#missing"},
16 | "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#missing"}
17 | }
18 | },
19 | {
20 | "from": [5.5, 6, 5.5],
21 | "to": [10.5, 16, 10.5],
22 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
23 | "color": 6,
24 | "faces": {
25 | "north": {"uv": [0, 0, 16, 16], "texture": "#missing"},
26 | "east": {"uv": [0, 0, 16, 16], "texture": "#missing"},
27 | "south": {"uv": [0, 0, 16, 16], "texture": "#missing"},
28 | "west": {"uv": [0, 0, 16, 16], "texture": "#missing"},
29 | "up": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#missing"}
30 | }
31 | },
32 | {
33 | "from": [4, 12.95, 4],
34 | "to": [12, 14.95, 12],
35 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
36 | "color": 8,
37 | "faces": {
38 | "north": {"uv": [0, 0, 16, 16], "texture": "#missing"},
39 | "east": {"uv": [0, 0, 16, 16], "texture": "#missing"},
40 | "south": {"uv": [0, 0, 16, 16], "texture": "#missing"},
41 | "west": {"uv": [0, 0, 16, 16], "texture": "#missing"},
42 | "up": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#missing"},
43 | "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#missing"}
44 | }
45 | },
46 | {
47 | "from": [4, 4, 4],
48 | "to": [12, 9, 12],
49 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
50 | "color": 3,
51 | "faces": {
52 | "north": {"uv": [0, 0, 16, 16], "texture": "#missing"},
53 | "east": {"uv": [0, 0, 16, 16], "texture": "#missing"},
54 | "south": {"uv": [0, 0, 16, 16], "texture": "#missing"},
55 | "west": {"uv": [0, 0, 16, 16], "texture": "#missing"},
56 | "up": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#missing"},
57 | "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#missing"}
58 | }
59 | },
60 | {
61 | "from": [4, 10, 4],
62 | "to": [12, 12, 12],
63 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
64 | "color": 3,
65 | "faces": {
66 | "north": {"uv": [0, 0, 16, 16], "texture": "#missing"},
67 | "east": {"uv": [0, 0, 16, 16], "texture": "#missing"},
68 | "south": {"uv": [0, 0, 16, 16], "texture": "#missing"},
69 | "west": {"uv": [0, 0, 16, 16], "texture": "#missing"},
70 | "up": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#missing"},
71 | "down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#missing"}
72 | }
73 | }
74 | ],
75 | "display": {
76 | "thirdperson_righthand": {
77 | "translation": [0, 3, 1],
78 | "scale": [0.55, 0.55, 0.55]
79 | },
80 | "head": {
81 | "rotation": [0, 90, 0],
82 | "translation": [0, 0.25, 0]
83 | }
84 | }
85 | }
--------------------------------------------------------------------------------