Skip to content

Commit

Permalink
Merge branch 'mc-1.18.x/stable' into mc-1.18.x/1.18.2
Browse files Browse the repository at this point in the history
  • Loading branch information
SquidDev committed Jun 13, 2022
2 parents c647706 + dc7a417 commit dde9871
Show file tree
Hide file tree
Showing 18 changed files with 185 additions and 119 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}


- name: Build and publish with Gradle
run: ./gradlew build publish
env:
Expand Down
5 changes: 1 addition & 4 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ ports:

vscode:
extensions:
- eamodio.gitlens
- github.vscode-pull-request-github
- ms-azuretools.vscode-docker
- redhat.java
- richardwillis.vscode-gradle
- vscjava.vscode-java-debug
- vscode.github


tasks:
- name: Setup pre-commit hool
Expand Down
75 changes: 41 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,64 @@
<img src="logo.png" alt="CC: Restitched" width="100%"/>
<img src="readme-assets/logo.png" alt="CC: Restitched" width="50%"/>

[![Current build status](https://github.com/cc-tweaked/cc-restitched/workflows/Build/badge.svg)](https://github.com/cc-tweaked/cc-restitched/actions "Current build status")
[![Download CC: Restitched on CurseForge](https://camo.githubusercontent.com/07622e6662ef5ead080c4840ef6514a34e079d63015f7e51c977a55b1881dfb9/687474703a2f2f63662e776179326d7563686e6f6973652e65752f7469746c652f63632d726573746974636865642e737667)](https://www.curseforge.com/minecraft/mc-mods/cc-restitched "Download CC: Restitched on CurseForge")
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/cc-tweaked/cc-restitched/tree/1.17.1)
[![Current build status](https://img.shields.io/github/workflow/status/cc-tweaked/cc-restitched/Build?style=for-the-badge&logo=github)](https://github.com/cc-tweaked/cc-restitched/actions "Current build status")
[![Download CC: Restitched on CurseForge](https://img.shields.io/badge/curseforge-cc%3Arestitched-orange?style=for-the-badge&logo=curseforge)](https://www.curseforge.com/minecraft/mc-mods/cc-restitched "Download CC: Restitched on CurseForge")
[![Download CC: Restitched via Modrinth](https://img.shields.io/badge/dynamic/json?color=5da545&label=modrinth&prefix=downloads%20&query=downloads&url=https://api.modrinth.com/api/v1/mod/cc-restitched&style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSIgd2lkdGg9IjE0LjY2NyIgaGVpZ2h0PSIxNC42NjciICB4bWxuczp2PSJodHRwczovL3ZlY3RhLmlvL25hbm8iPjxkZWZzPjxjbGlwUGF0aCBpZD0iQSI+PHBhdGggZD0iTTAgMGgxMXYxMUgweiIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNBKSI+PHBhdGggZD0iTTEuMzA5IDcuODU3YTQuNjQgNC42NCAwIDAgMS0uNDYxLTEuMDYzSDBDLjU5MSA5LjIwNiAyLjc5NiAxMSA1LjQyMiAxMWMxLjk4MSAwIDMuNzIyLTEuMDIgNC43MTEtMi41NTZoMGwtLjc1LS4zNDVjLS44NTQgMS4yNjEtMi4zMSAyLjA5Mi0zLjk2MSAyLjA5MmE0Ljc4IDQuNzggMCAwIDEtMy4wMDUtMS4wNTVsMS44MDktMS40NzQuOTg0Ljg0NyAxLjkwNS0xLjAwM0w4LjE3NCA1LjgybC0uMzg0LS43ODYtMS4xMTYuNjM1LS41MTYuNjk0LS42MjYuMjM2LS44NzMtLjM4N2gwbC0uMjEzLS45MS4zNTUtLjU2Ljc4Ny0uMzcuODQ1LS45NTktLjcwMi0uNTEtMS44NzQuNzEzLTEuMzYyIDEuNjUxLjY0NSAxLjA5OC0xLjgzMSAxLjQ5MnptOS42MTQtMS40NEE1LjQ0IDUuNDQgMCAwIDAgMTEgNS41QzExIDIuNDY0IDguNTAxIDAgNS40MjIgMCAyLjc5NiAwIC41OTEgMS43OTQgMCA0LjIwNmguODQ4QzEuNDE5IDIuMjQ1IDMuMjUyLjgwOSA1LjQyMi44MDljMi42MjYgMCA0Ljc1OCAyLjEwMiA0Ljc1OCA0LjY5MSAwIC4xOS0uMDEyLjM3Ni0uMDM0LjU2bC43NzcuMzU3aDB6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiM1ZGE0MjYiLz48L2c+PC9zdmc+)](https://modrinth.com/mod/cc-restitched "Download CC: Restitched via Modrinth")
[![Gitpod ready-to-code](https://shields.io/badge/gitpod-ready--to--code-green?logo=gitpod&style=for-the-badge)](https://gitpod.io/#https://github.com/cc-tweaked/cc-restitched)

# What is CC: Restitched?
This is a fabric port of [SquidDev-CC/CC-Tweaked](https://github.com/SquidDev-CC/CC-Tweaked). The work is a continuation of [Zundrel/cc-tweaked-fabric](https://github.com/Zundrel/cc-tweaked-fabric).

## CC: Restitched vs. CC: Tweaked
CC: R tries to maintain parity with CC: T, but may be behind or divergent in some areas. If you notice a disparity please open an issue. CC: R major and minor version numbers indicate parity with the major features of that version of CC: T. Patch version numbers will not align.
<img src="readme-assets/whatiscc.png" alt="What is CC:Restitched" width="37.5%"/>

## 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.
This is a port of [cc-tweaked/CC-Tweaked](https://github.com/cc-tweaked/CC-Tweaked) to the [Fabric modloader](https://fabricmc.net/) as well as being a continuation of [JemmaZZ/cc-tweaked-fabric](https://github.com/JemmaZZ/cc-tweaked-fabric) and can be found at [Github Actions](https://github.com/cc-tweaked/cc-restitched/actions), [Modrinth](https://modrinth.com/mod/cc-restitched) and [Curseforge](https://www.curseforge.com/minecraft/mc-mods/cc-restitched).

<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)!
<img src="readme-assets/ccrandcct.png" alt="CC: Restitched and CC: Tweaked" width="37.5%"/>

CC: R tries to maintain parity with CC: T, though it may be behind or divergent in some areas. If you notice a disparity please open an issue. CC: R major and minor version numbers indicate parity with the major features of that version of CC: T. Patch version numbers will NOT align.

<img src="readme-assets/incluededpacks.png" alt="Included Resource Packs" width="37.5%"/>

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 ComputerCraft textures you should enable the `classic` resource pack.
We also have a third resourcepack made by [3prm3](https://github.com/3prm3), it features a complete overhaul of CC's textures (in the style of an industrial mod) and can be used by enabling the `overhaul` resource pack. You can also check out his resource pack over [here](https://github.com/cc-orgs/cc-overhaul/tree/main) as well!<img src="https://raw.githubusercontent.com/cc-orgs/cc-overhaul/main/pack.png" alt="CC: Restitched" width="32" height="32"/>

<img src="readme-assets/bleedingedgever.png" alt="Bleeding Edge Versions" width="37.5%"/>

## 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 (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;
<img src="readme-assets/contributing.png" alt="Contributing to the Repo" width="37.5%"/>

Any contribution is welcome, be it 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) 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.
3) You cannot intentionally implement bugs and security vulnerabilities.
4) Unless the code is taken directly from CC: Tweaked, `lua` code is offlimits from alteration. If you wish to contribute your changes to the in game rom please contribute upstream at [CC-Tweaked](https://github.com/cc-tweaked/CC-Tweaked).
5) Branches should be named in this format `mc-<major ver.>.x/<specific-mc-ver.>`

<img src="readme-assets/renderingmodcompat.png" alt="Rendering Mod Compatibility" width="37.5%"/>

# Rendering Mod Compatability
* [ YES ] Sodium
* [ YES ] Optifine
* [ YES ] [Sodium](https://www.curseforge.com/minecraft/mc-mods/sodium)
* [ YES ] [OptiFabric](https://www.curseforge.com/minecraft/mc-mods/optifabric)
* Works with VBO Rendering (automatically set)
* No issues
* [ OK ] Iris Shaders
* "Works" with TBO Rendering (Default)
* Works with VBO Rendering
* [ YES ] Canvas
* [ YES ] [Iris Shaders & Sodium](https://www.curseforge.com/minecraft/mc-mods/irisshaders)
* [ YES ] [Canvas](https://www.curseforge.com/minecraft/mc-mods/canvas-renderer)
* Works with TBO Rendering (Default)
- ![](https://cdn.discordapp.com/attachments/851534220680495165/960677825185214574/unknown.png)
* Scuffed with VBO Rendering
* <details>
<summary>VBO is broken</summary>

Monitors are just... scuffed beyond belief.
- ![](https://i.imgur.com/JVNZ2Pn.png)
- ![](https://i.imgur.com/SXXpr54.png)
* The content to the left is supposed to be on the monitors to the right, also the bottom one is supposed to `black/white` not colored.
* Turtle Texture for some reason?
- ![](https://i.imgur.com/OEmZXsx.png)
Monitors are following the player?.
- ![](https://cdn.discordapp.com/attachments/851534220680495165/960674312896016394/unknown.png)
- ![](https://cdn.discordapp.com/attachments/851534220680495165/960674662839357530/unknown.png)
- ![](https://cdn.discordapp.com/attachments/851534220680495165/960674410510041128/unknown.png)
* The screen seems to get bigger the closer you get to it.
</details>

## 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).
<img src="readme-assets/community.png" alt="CC: Restitched" width="37.5%"/>

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 [Computercraft Forum](https://forums.computercraft.cc/) and the Computer Mods [Discord!](https://discord.gg/H2UyJXe). There is also a wiki that can be found at [https://tweaked.cc/](https://tweaked.cc/)

<img src="readme-assets/peripheralmods.png" alt="CC: Restitched" width="37.5%"/>

## 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!
Unfortunately, CC: Restitched does not have as many peripherals mods available as CC: Tweaked though there is one known as Allium Peripherals made by [hugeblank](https://github.com/hugeblank) which can be found [here](https://www.curseforge.com/minecraft/mc-mods/allium-peripherals). But 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 CC: R 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!
16 changes: 12 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ dependencies {

//modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:6.0.254-alpha"
//modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:6.0.254-alpha"
modCompileOnly 'maven.modrinth:iris:1.18.x-v1.2.4'

modCompileOnly "maven.modrinth:iris:1.18.x-v1.2.5"

// For running with Iris. Can be ignored most of the time.
// modRuntimeOnly "maven.modrinth:sodium:mc1.18.2-0.4.1"
// runtimeOnly "org.joml:joml:1.10.2"
// runtimeOnly "org.anarres:jcpp:1.4.14"

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.7.0'
Expand Down Expand Up @@ -313,20 +319,21 @@ if (System.getenv("MODRINTH")) {
finalizedBy project.tasks.modrinth
}
}

/*
if (System.getenv("CURSEFORGE")) {
curseforge {
apiKey = System.getenv("CURSEFORGE")
project {
id = "462672"
releaseType = "release"
displayName = "[" + ((String) project.mc_version) + "] " + version
changelog = System.getenv("CHANGELOG")
changelogType = "markdown"
addGameVersion ((String) project.mc_version)
addGameVersion "Fabric"
mainArtifact(remapJar)
mainArtifact(remapJar) {
displayName = "[" + ((String) project.mc_version) + "] " + version
}
afterEvaluate {
uploadTask.dependsOn("remapJar")
Expand All @@ -342,3 +349,4 @@ if (System.getenv("CURSEFORGE")) {
finalizedBy project.tasks.curseforge
}
}
*/
Binary file removed logo.png
Binary file not shown.
Binary file added readme-assets/bleedingedgever.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme-assets/ccrandcct.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme-assets/community.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme-assets/contributing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme-assets/incluededpacks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme-assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme-assets/peripheralmods.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme-assets/renderingmodcompat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme-assets/whatiscc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -191,28 +191,26 @@ private static void renderTerminal( @Nonnull MultiBufferSource bufferSource, Pos
var vbo = monitor.buffer;
if( redraw )
{
int vertexSize = RenderTypes.MONITOR.format().getVertexSize();

// Draw the background contents of the terminal into one vbo.
ByteBuffer buffer = getBuffer( DirectFixedWidthFontRenderer.getVertexCount( terminal ) * vertexSize );

DirectFixedWidthFontRenderer.drawTerminalBackground(
buffer, 0, 0, terminal, !monitor.isColour(), yMargin, yMargin, xMargin, xMargin
);
int backgroundBytes = buffer.position();
DirectFixedWidthFontRenderer.drawTerminalForeground(
buffer, 0, 0, terminal, !monitor.isColour(), yMargin, yMargin, xMargin, xMargin
var sink = IrisCompat.INSTANCE.getVertexSink(
DirectFixedWidthFontRenderer.getVertexCount( terminal ),
TileEntityMonitorRenderer::getBuffer
);
int termVertices = buffer.position() / vertexSize;
monitor.backgroundVertexCount = backgroundBytes / vertexSize;
monitor.foregroundVertexCount = termVertices - monitor.backgroundVertexCount;
int vertexSize = sink.getFormat().getVertexSize();
var buffer = sink.buffer();

DirectFixedWidthFontRenderer.drawTerminalBackground( sink, 0, 0, terminal, !monitor.isColour(), yMargin, yMargin, xMargin, xMargin );
monitor.backgroundVertexCount = buffer.position() / vertexSize;

DirectFixedWidthFontRenderer.drawTerminalForeground( sink, 0, 0, terminal, !monitor.isColour(), yMargin, yMargin, xMargin, xMargin );
monitor.foregroundVertexCount = (buffer.position() / vertexSize) - monitor.backgroundVertexCount;

// If the cursor is visible, we append it to the end of our buffer. When rendering, we can either
// render n or n+1 quads and so toggle the cursor on and off.
DirectFixedWidthFontRenderer.drawCursor( buffer, 0, 0, terminal, !monitor.isColour() );
DirectFixedWidthFontRenderer.drawCursor( sink, 0, 0, terminal, !monitor.isColour() );

buffer.flip();
vbo.upload( termVertices, RenderTypes.MONITOR.mode(), RenderTypes.MONITOR.format(), buffer );
vbo.upload( buffer.limit() / vertexSize, RenderTypes.MONITOR.mode(), sink.getFormat(), buffer );
}

// TODO Figure out how to setup the inverse view rotation matrix properly.
Expand Down
Loading

0 comments on commit dde9871

Please sign in to comment.