1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-27 07:52:18 +00:00

Fix #68, #69. Pre-setup auto releasing (#72)

* Fix #68, #69. Pre-setup auto releasing
This commit is contained in:
Patbox 2022-03-19 17:10:53 +01:00 committed by GitHub
parent f8fe161b70
commit eface1495e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 126 additions and 30 deletions

41
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Release
on:
release:
types:
- published
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: |
~/.gradle/loom-cache
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build and publish with Gradle
run: ./gradlew build publish
env:
CURSEFORGE: ${{ secrets.CURSEFORGE }}
MODRINTH: ${{ secrets.MODRINTH }}
CHANGELOG: ${{ github.event.release.body }}
- name: Upload GitHub release
uses: AButler/upload-release-assets@v2.0
with:
files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -13,29 +13,27 @@ CC: R tries to maintain parity with CC: T, but may be behind or divergent in som
## Resource Packs
This mod includes textures by [Jummit](https://github.com/Jummit) that are more in line with the style of Mojang's new texture-artist, Jappa. If you prefer the original textures, enable the "Classic" resource pack.
<img src="https://raw.githubusercontent.com/3prm3/cc-pack/main/pack.png" alt="CC: Restitched" width="16" height="16"/> We also have a second resourcepack made by [3prm3](https://github.com/3prm3), it features a complete overhaul and can be enabled by enabling the `overhaul` resource pack, go check out his resource pack over [here](https://github.com/3prm3/cc-pack/)!
<img src="https://raw.githubusercontent.com/cc-orgs/cc-overhaul/main/pack.png" alt="CC: Restitched" width="32" height="32"/> We also have a second resourcepack made by [3prm3](https://github.com/3prm3), it features a complete overhaul and can be enabled by enabling the `overhaul` resource pack, go check out his resource pack over [here](https://github.com/cc-orgs/cc-overhaul/tree/main)!
## Contributing
## Bleeding Edge Ver.
Bleeding edge builds can be found [here](https://github.com/cc-tweaked/cc-restitched/actions) at Github Actions. In the .zip file there should be a "-dev" jar, a "-javadoc" jar, a "-sources-dev" jar, a "-sources" jar, and a plain (jar without an affixed tag) jar. Put the plain jar in the mods folder.
## Contributions
Any contribution is welcome, be that using the mod, reporting bugs or contributing code. In order to start helping develop CC: R there are a few rules;
1) Make sure your code follows the checkstyle rules. You can test this by running `./gradle build` or `./gradle check`.
2) Do not alter the lua code unless those changes are taken directly from CC: Tweaked. If you wish to contribute changes to the in game rom please contribute upstream at [CC-Tweaked](https://github.com/SquidDev-CC/CC-Tweaked).
1) Follow the [Fabric](https://fabricmc.net/) programming guidelines as close as possible. This means you have to use [`loom`](https://fabricmc.net/wiki/tutorial:mappings) mappings, if you use anything else, your code will be rejected.
2) Make sure your code follows the checkstyle rules. You can test this by running `./gradle build` or `./gradle check`.
3) Do not alter the lua code unless those changes are taken directly from CC: Tweaked. If you wish to contribute changes to the in game rom please contribute upstream at [CC-Tweaked](https://github.com/SquidDev-CC/CC-Tweaked).
4) You cannot intentionally implement bugs and security vulnerabilities.
5) Unless the code is taken directly from CC: Tweaked, `lua` code is offlimits from alteration.
# Does this work Fabric's many rendering mods?
# Rendering Mod Compatability
* [ YES ] Sodium
* [ YES ] Optifine
* Works with VBO Rendering (automatically set)
* No issues
* [ EHH ] Iris Shaders
* [ OK ] Iris Shaders
* "Works" with TBO Rendering (Default)
* Crashes with VBO Rendering
* <details>
<summary>Shaders are broken</summary>
* Shaders will cause varrying results ranging from monitors being invisible, to straight up crashing.
* Not using shaders will result in odd Z-Fighting of the monitor display and the transparent texture
- ![](https://user-images.githubusercontent.com/10422110/136869483-91824c5f-841f-4316-bfb1-2412477a29ee.png)
- ![](https://user-images.githubusercontent.com/10422110/136869535-a16581a3-5e0a-4632-923f-c8de8cc8a6ea.png)
</details>
* Works with VBO Rendering
* [ YES ] Canvas
* Works with TBO Rendering (Default)
* Scuffed with VBO Rendering
@ -50,17 +48,8 @@ Any contribution is welcome, be that using the mod, reporting bugs or contributi
- ![](https://i.imgur.com/OEmZXsx.png)
</details>
## Contributing
Any contribution is welcome, be that using the mod, reporting bugs or contributing code. In order to start helping develop CC: R there are a few rules;
1) Follow the [Fabric](https://fabricmc.net/) programming guidelines as close as possible. This means you have to use [`loom`](https://fabricmc.net/wiki/tutorial:mappings) mappings, if you use anything else, your code will be rejected.
2) You cannot intentionally implement bugs and security vulnerabilities.
3) Unless the code is taken directly from CC: Tweaked, `lua` code is offlimits from alteration.
## Bleeding Edge Builds
Bleeding edge builds can be found [here](https://github.com/cc-tweaked/cc-restitched/actions) at Github Actions.
## Community
If you need help getting started with CC: Restitched, want to show off your latest project, or just want to chat about ComputerCraft, here is the [Forum](https://forums.computercraft.cc/) and the [Discord](https://discord.gg/H2UyJXe).
## Perpheral mods
## Perpheral Mods
Unfortunately, CC: Restitched does not have as many peripherals mods available as CC: Tweaked. If you're an interested mod developer, please check out our `api` package. If you've already made a mod with CC: R peripheral support OR if you're a player who found a mod with ComputerCraft integration, please open an [issue here](https://github.com/cc-tweaked/cc-restitched/issues/new?assignees=&labels=peripheralShoutout&template=peripheral_shoutout.md) to let us know and we'll add it to the list!

View File

@ -5,6 +5,8 @@ plugins {
id "com.github.hierynomus.license" version "0.16.1"
id "org.jetbrains.kotlin.jvm" version "1.5.21"
id 'fabric-loom' version '0.10-SNAPSHOT'
id "com.modrinth.minotaur" version "2.+"
id 'com.matthewprenger.cursegradle' version '1.4.0'
}
def javaVersion = JavaLanguageVersion.of(17)
@ -247,3 +249,49 @@ publishing {
// mavenLocal()
}
}
if (System.getenv("MODRINTH")) {
modrinth {
token = System.getenv("MODRINTH")
projectId = "eldBwa5V"
versionNumber = version
versionType = "release"
uploadFile = remapJar
gameVersions = [((String) project.mc_version)]
loaders = ["fabric"]
changelog = System.getenv("CHANGELOG")
}
remapJar {
finalizedBy project.tasks.modrinth
}
}
if (System.getenv("CURSEFORGE")) {
curseforge {
apiKey = System.getenv("CURSEFORGE")
project {
id = "462672"
releaseType = "release"
changelog = System.getenv("CHANGELOG")
changelogType = "markdown"
addGameVersion ((String) project.mc_version)
addGameVersion "Fabric"
mainArtifact(remapJar)
afterEvaluate {
uploadTask.dependsOn("remapJar")
}
}
options {
forgeGradleIntegration = false
}
}
remapJar {
finalizedBy project.tasks.curseforge
}
}

View File

@ -2,7 +2,7 @@
org.gradle.jvmargs=-Xmx3G
# Mod properties
mod_version=1.100.3
mod_version=1.100.4
# Minecraft properties
mc_version=1.18.2

View File

@ -15,8 +15,8 @@ import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.ModContainer;
import com.google.common.collect.ImmutableMap;
import com.google.gson.JsonParseException;
import org.apache.logging.log4j.Logger;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

View File

@ -62,7 +62,6 @@ import net.minecraft.world.inventory.MenuType;
import net.minecraft.world.item.*;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockBehaviour;
@ -148,12 +147,12 @@ public final class Registry
private static BlockBehaviour.Properties properties()
{
return BlockBehaviour.Properties.of( Material.GLASS ).strength( 2F ).sound( SoundType.STONE ).noOcclusion();
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2F ).noOcclusion();
}
private static BlockBehaviour.Properties turtleProperties()
{
return FabricBlockSettings.copyOf( Blocks.STONE ).strength( 2.5f );
return BlockBehaviour.Properties.of( Material.STONE ).strength( 2.5f );
}
private static BlockBehaviour.Properties modemProperties()

View File

@ -0,0 +1,19 @@
{
"replace": false,
"values": [
"computercraft:monitor_normal",
"computercraft:monitor_advanced",
"computercraft:computer_normal",
"computercraft:computer_advanced",
"computercraft:computer_command",
"computercraft:turtle_normal",
"computercraft:turtle_advanced",
"computercraft:speaker",
"computercraft:disk_drive",
"computercraft:printer",
"computercraft:wireless_modem_normal",
"computercraft:wireless_modem_advanced",
"computercraft:wired_modem_full",
"computercraft:cable"
]
}