This repository has been archived by the owner on Mar 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix tick of player suffocation on teleport and join game * bump mcxr-play version * remove fart and fix rendering bugs
- Loading branch information
Showing
9 changed files
with
279 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,79 @@ | ||
name: gradle-ci | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v3 | ||
- name: setup JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: adopt | ||
- name: update cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/loom-cache | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} | ||
restore-keys: ${{ runner.os }}-gradle- | ||
|
||
- name: make gradle wrapper executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: build | ||
run: ./gradlew build | ||
|
||
- if: ${{ contains(github.ref, 'core') }} | ||
name: Upload MCXR-Core artifacts to Modrinth, Curseforge and GitHub | ||
uses: Kir-Antipov/mc-publish@v2.0 | ||
with: | ||
modrinth-id: hcEWWGik | ||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
|
||
curseforge-id: 631772 | ||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
|
||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
files: mcxr-core/build/libs/!(*-@(dev|sources|all)).jar | ||
|
||
version-type: beta | ||
|
||
loaders: fabric | ||
|
||
version-resolver: latest | ||
|
||
- if: ${{ contains(github.ref, 'play') }} | ||
name: Upload MCXR-Play artifacts to Modrinth, Curseforge and GitHub | ||
uses: Kir-Antipov/mc-publish@v2.0 | ||
with: | ||
modrinth-id: hcEWWGik | ||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
|
||
curseforge-id: 9jVyqpHR | ||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
|
||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
files: mcxr-play/build/libs/!(*-@(dev|sources|all)).jar | ||
|
||
version-type: beta | ||
|
||
loaders: fabric | ||
|
||
version-resolver: latest | ||
## TODO this | ||
#name: gradle-ci | ||
# | ||
#on: | ||
# release: | ||
# types: | ||
# - published | ||
# | ||
#jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# | ||
# steps: | ||
# - name: checkout repository | ||
# uses: actions/checkout@v3 | ||
# - name: setup JDK 17 | ||
# uses: actions/setup-java@v3 | ||
# with: | ||
# java-version: 17 | ||
# distribution: adopt | ||
# - name: update cache | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: | | ||
# ~/.gradle/caches | ||
# ~/.gradle/loom-cache | ||
# ~/.gradle/wrapper | ||
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} | ||
# restore-keys: ${{ runner.os }}-gradle- | ||
# | ||
# - name: make gradle wrapper executable | ||
# run: chmod +x ./gradlew | ||
# | ||
# - name: build | ||
# run: ./gradlew build | ||
# | ||
# - if: ${{ contains(github.ref, 'core') }} | ||
# name: Upload MCXR-Core artifacts to Modrinth, Curseforge and GitHub | ||
# uses: Kir-Antipov/mc-publish@v2.0 | ||
# with: | ||
# name: MCXR Core | ||
# | ||
# modrinth-id: hcEWWGik | ||
# modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
# | ||
# curseforge-id: 631772 | ||
# curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
# | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# | ||
# files: mcxr-core/build/libs/!(*-@(dev|sources|all)).jar | ||
# | ||
# version-type: beta | ||
# | ||
# loaders: fabric | ||
# | ||
# version-resolver: latest | ||
# | ||
# - if: ${{ contains(github.ref, 'play') }} | ||
# name: Upload MCXR-Play artifacts to Modrinth, Curseforge and GitHub | ||
# uses: Kir-Antipov/mc-publish@v2.0 | ||
# with: | ||
# name: MCXR Play | ||
# | ||
# modrinth-id: hcEWWGik | ||
# modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
# | ||
# curseforge-id: 9jVyqpHR | ||
# curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
# | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# | ||
# files: mcxr-play/build/libs/!(*-@(dev|sources|all)).jar | ||
# | ||
# version-type: beta | ||
# | ||
# loaders: fabric | ||
# | ||
# version-resolver: latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
mcxr-play/src/main/java/net/sorenon/mcxr/play/rendering/RenderTypeBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package net.sorenon.mcxr.play.rendering; | ||
|
||
import com.mojang.blaze3d.vertex.VertexFormat; | ||
import net.minecraft.client.renderer.RenderType; | ||
import net.minecraft.client.renderer.entity.layers.RenderLayer; | ||
import net.minecraft.resources.ResourceLocation; | ||
|
||
public class RenderTypeBuilder { | ||
|
||
private final String name; | ||
private final VertexFormat format; | ||
private final VertexFormat.Mode drawMode; | ||
private final int expectedBufferSize; | ||
private final boolean affectsCrumbling; | ||
private final boolean sortOnUpload; | ||
|
||
public final RenderType.CompositeState.CompositeStateBuilder innerBuilder; | ||
|
||
public RenderTypeBuilder(ResourceLocation name, VertexFormat format, VertexFormat.Mode drawMode, int expectedBufferSize, boolean affectsCrumbling, boolean sortOnUpload) { | ||
this.name = "mcxr_" + name.toString(); | ||
this.format = format; | ||
this.drawMode = drawMode; | ||
this.expectedBufferSize = expectedBufferSize; | ||
this.affectsCrumbling = affectsCrumbling; | ||
this.sortOnUpload = sortOnUpload; | ||
this.innerBuilder = RenderType.CompositeState.builder(); | ||
} | ||
|
||
public RenderType.CompositeRenderType build(boolean affectsOutline) { | ||
return createInner(name, format, drawMode, expectedBufferSize, affectsCrumbling, sortOnUpload, innerBuilder.createCompositeState(affectsOutline)); | ||
} | ||
|
||
public static RenderType.CompositeRenderType createInner(String name, VertexFormat format, VertexFormat.Mode drawMode, int expectedBufferSize, boolean affectsCrumbling, boolean sortOnUpload, RenderType.CompositeState compositeState) { | ||
return RenderType.create(name, format, drawMode, expectedBufferSize, affectsCrumbling, sortOnUpload, compositeState); | ||
} | ||
} |
Oops, something went wrong.