Virtuoel / Statement

MIT License
10 stars 4 forks source link

Statement

Library mod for the Quilt, NeoForge, Forge, and Fabric mod loaders that allows mod developers to modify blockstates of existing blocks.

Information for Players

Show/Hide Information for Players
## Required Mods to Run
Show/Hide Required Mods
### Playing on Fabric - Newest version of the [Fabric mod loader](https://fabricmc.net/use/installer/) - Newest version of the [Fabric A](https://www.curseforge.com/minecraft/mc-mods/fabric-api/files/all)[PI mod](https://modrinth.com/mod/fabric-api/versions) for whichever Minecraft version you're playing on ### Playing on Forge - Newest version of the [Forge mod loader](https://files.minecraftforge.net/net/minecraftforge/forge/) for whichever Minecraft version you're playing on ### Playing on Quilt - Newest version of the [Quilt mod loader](https://quiltmc.org/en/install/) - Newest version of the [Quilt Stan](https://www.curseforge.com/minecraft/mc-mods/qsl/files/all)[dard Libraries](https://modrinth.com/mod/qsl/versions) for whichever Minecraft version you're playing on
## Supported Minecraft Versions
Show/Hide Supported Minecraft Versions
### Fabric/Quilt Versions Supported Versions of `Statement-x.y.z+1.14.4-1.20.4`: `1.20.4`, `1.20.2`, `1.20.1`, `1.19.4`, `1.19.2`, `1.18.2`, `1.17.1`, `1.16.5`, `1.15.2`, `1.14.4` ### NeoForge Versions Supported Versions of `Statement-x.y.z+1.20.4-neoforge`: `1.20.4` Supported Versions of `Statement-x.y.z+1.20.2-neoforge`: `1.20.2` ### Forge Versions Supported Versions of `Statement-x.y.z+1.20.1-forge`: `1.20.1` Supported Versions of `Statement-x.y.z+1.19.4-forge`: `1.19.4` Supported Versions of `Statement-x.y.z+1.19.2-forge`: `1.19.2` Supported Versions of `Statement-x.y.z+1.18.2-forge`: `1.18.2` Supported Versions of `Statement-x.y.z+1.17.1-forge`: `1.17.1` Supported Versions of `Statement-x.y.z+1.16.5-forge`: `1.16.5`
## Mod Features
Show/Hide Mod Features

Statement allows mod developers to: - Safely add and remove blockstate properties to/from existing blocks - Make new properties which would have a mutable collection of values that can be modified later - Perform the above points such that parts of vanilla that aren't coded with blockstate property mutability in mind don't break (e.g. certain parts of worldgen) - Have certain blockstates sync to the client as another type of blockstate (e.g. a property that only exists serverside) - Have certain blockstates' IDs be placed at the end of the blockstate ID list (prevents possible gaps in the ID list when combined with e.g. serverside properties)

Information for Developers

Show/Hide Information for Developers
## Adding a Dependency
Show/Hide Dependency Information
### Maven
Show/Hide Maven Information
To make use of Statement in your own mod, you'll first need to go to your
`repositories` block near the top of your `build.gradle` and add JitPack
to the bottom of the block like below: ```groovy // ... repositories { // ... your other Maven repositories above, if any ... maven { url = "https://jitpack.io" } } dependencies { // ... } // ... ```
### Mod Version and Dependency Configuration
Show/Hide Dependency Configuration Information
Now that a Maven repository is specified, add `statement_version=x.y.z-w` to your
`gradle.properties`, replacing `x.y.z-w` with one of the available version strings
from the [list of release tags](../../../tags). Lastly, in your `build.gradle`'s `dependencies` block, add the corresponding line from below depending on your mod loader: #### Developing for Quilt/Fabric with Loom ```groovy modApi("com.github.Virtuoel:Statement:${statement_version}", { exclude group: "net.fabricmc.fabric-api" }) ``` #### Developing for NeoForge with NeoGradle ```groovy implementation "com.github.Virtuoel:Statement:${statement_version}" ``` #### Developing for Forge with ForgeGradle ```groovy implementation fg.deobf("com.github.Virtuoel:Statement:${statement_version}") ``` #### Developing for Forge with Architectury Loom ```groovy modApi("com.github.Virtuoel:Statement:${statement_version}") ```
### Fixing Mixins of Dependencies If Using ForgeGradle
Show/Hide Fix on ForgeGradle
If you're using Forge with ForgeGradle, make sure the `mixingradle` plugin is present
and applied: Make sure the following line is present in your `build.gradle`'s
`buildscript { repositories {} }` block. ```groovy maven { url = "https://repo.spongepowered.org/repository/maven-public/" } ``` Then make sure the following line is present in your `build.gradle`'s
`buildscript { dependencies {} }` block. ```groovy classpath "org.spongepowered:mixingradle:0.7-SNAPSHOT" ``` Next, make sure the following line is present in your `build.gradle`. ```groovy apply plugin: "org.spongepowered.mixin" ``` Then regenerate your run configurations with `genEclipseRuns`, `genIntellijRuns`, or
`genVSCodeRuns` depending on your IDE.
Show/Hide Fix on Older ForgeGradle (4 and below)
If you're using Forge with ForgeGradle 4 or older, make sure refmap remapping is
enabled in your `build.gradle`'s run configuration blocks. Make sure the following lines are present in the `client {}`, `server {}`, and
`data {}` run configuration blocks. ```groovy property 'mixin.env.remapRefMap', 'true' property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" ``` Then regenerate your run configurations with `genEclipseRuns`, `genIntellijRuns`, or
`genVSCodeRuns` depending on your IDE.