Skip to content

Commit

Permalink
Merge branch '1.20.x' into obj_loader_leak
Browse files Browse the repository at this point in the history
  • Loading branch information
sciwhiz12 authored Nov 1, 2023
2 parents e1f1fff + c2229a3 commit 2828efe
Show file tree
Hide file tree
Showing 26 changed files with 158 additions and 378 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and test PRs

on:
pull_request:
types:
- synchronize
- opened
- ready_for_review
- reopened

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true

# GradleUtils will append the branch name to the version,
# but for that we need a properly checked out branch
- name: Create branch for commit
run:
git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }}

- name: Setup JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'

- name: Setup with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: setup
cache-read-only: false

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
cache-read-only: false
16 changes: 0 additions & 16 deletions .github/workflows/comments.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/issues.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/pull_request_review.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/pull_request_review_comment.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/pull_request_review_comment_run.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/pull_request_review_run.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/pull_requests.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/push.yml

This file was deleted.

94 changes: 0 additions & 94 deletions .teamcity/settings.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ project {

buildType(Build)
buildType(BuildSecondaryBranches)
buildType(PullRequests)
buildType(PullRequestChecks)
buildType(PullRequestCompatibility)
buildType(PullRequestPatchModifications)

params {
text("docker_jdk_version", "17", label = "Gradle version", description = "The version of the JDK to use during execution of tasks in a JDK.", display = ParameterDisplay.HIDDEN, allowEmpty = false)
Expand Down Expand Up @@ -108,93 +104,3 @@ object BuildSecondaryBranches : BuildType({
""".trimIndent(), label = "The branch specification of the repository", description = "By default all main branches are build by the configuration. Modify this value to adapt the branches build.", display = ParameterDisplay.HIDDEN, allowEmpty = true)
}
})

object PullRequests : BuildType({
templates(AbsoluteId("MinecraftForge_BuildPullRequests"), AbsoluteId("MinecraftForge_SetupGradleUtilsCiEnvironmen"), AbsoluteId("MinecraftForge_BuildWithDiscordNotifications"), AbsoluteId("MinecraftForge_SetupProjectUsingGradle"), AbsoluteId("MinecraftForge_BuildUsingGradle"))
id("MinecraftForge_MinecraftForge__PullRequests")
name = "Pull Requests"
description = "Builds pull requests for the project"

params {
param("git_branch_spec", "")
}

params {
checkbox("should_execute_build", "true", label = "Should build", description = "Indicates if the build task should be executed.", display = ParameterDisplay.HIDDEN,
checked = "true", unchecked = "false")
text(
"gradle_build_task",
"assemble",
label = "Gradle build task to execute during build",
description = "Determines the build task that is executed to build the project.",
display = ParameterDisplay.HIDDEN,
allowEmpty = false
)
}
})

object PullRequestChecks : BuildType({
templates(AbsoluteId("MinecraftForge_BuildPullRequests"), AbsoluteId("MinecraftForge_SetupGradleUtilsCiEnvironmen"), AbsoluteId("MinecraftForge_BuildWithDiscordNotifications"), AbsoluteId("MinecraftForge_SetupProjectUsingGradle"))
id("MinecraftForge_MinecraftForge__PullRequestChecks")
name = "Pull Requests (Checks)"
description = "Checks pull requests for the project"

params {
param("git_branch_spec", "")
}

steps {
gradle {
name = "Check"
id = "RUNNER_10_Check"

tasks = "checkAll"
gradleParams = "--continue %gradle_custom_args%"
enableStacktrace = true
}
}
})

object PullRequestCompatibility : BuildType({
templates(AbsoluteId("MinecraftForge_BuildPullRequests"), AbsoluteId("MinecraftForge_SetupGradleUtilsCiEnvironmen"), AbsoluteId("MinecraftForge_BuildWithDiscordNotifications"), AbsoluteId("MinecraftForge_SetupProjectUsingGradle"))
id("MinecraftForge_MinecraftForge__PullRequestCompatibility")
name = "Pull Requests (Compatibility)"
description = "Validates binary compatibility for pull requests made to the project"

params {
param("git_branch_spec", "")
}

steps {
gradle {
name = "Validate"
id = "RUNNER_10_Compatibility"

tasks = "checkJarCompatibility"
gradleParams = "--continue %gradle_custom_args%"
enableStacktrace = true
}
}
})

object PullRequestPatchModifications : BuildType({
templates(AbsoluteId("MinecraftForge_BuildPullRequests"), AbsoluteId("MinecraftForge_SetupGradleUtilsCiEnvironmen"), AbsoluteId("MinecraftForge_BuildWithDiscordNotifications"), AbsoluteId("MinecraftForge_SetupProjectUsingGradle"))
id("MinecraftForge_MinecraftForge__PullRequestPatchModifications")
name = "Pull Requests (Patch Correctness)"
description = "Validates initial patch correctness"

params {
param("git_branch_spec", "")
}

steps {
gradle {
name = "Validate"
id = "RUNNER_10_Compatibility"

tasks = ":forge:genPatches failGitChanges"
gradleParams = "--continue %gradle_custom_args%"
enableStacktrace = true
}
}
})
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,25 @@ plugins {
apply plugin: 'net.neoforged.gradleutils'

gradleutils.version {
minecraftVersion project.minecraft_version
versionPrefix = null // Reset version prefix, which is set by prev. line
tags {
label = "beta"
cleanMarkerLabel = "stable"
}
branches {
suffixBranch = true
}
}

changelog {
from "20.2"
disableAutomaticPublicationRegistration()
}

// Print version, generally useful to know - also appears on CI
System.out.println("NeoForge version ${gradleutils.version.toString()}")

allprojects {
version gradleutils.version.toString()
group 'net.neoforged'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,3 @@
}

public static BlockFaceUV recomputeUVs(BlockFaceUV p_111582_, Direction p_111583_, Transformation p_111584_, ResourceLocation p_111585_) {
@@ -154,8 +161,8 @@
p_111615_[i + 1] = Float.floatToRawIntBits(p_254291_.y());
p_111615_[i + 2] = Float.floatToRawIntBits(p_254291_.z());
p_111615_[i + 3] = -1;
- p_111615_[i + 4] = Float.floatToRawIntBits(p_111618_.getU(p_111619_.getU(p_111616_) / 16.0F));
- p_111615_[i + 4 + 1] = Float.floatToRawIntBits(p_111618_.getV(p_111619_.getV(p_111616_) / 16.0F));
+ p_111615_[i + 4] = Float.floatToRawIntBits(p_111618_.getU(p_111619_.getU(p_111616_) / 16.0F * .999F + p_111619_.getU((p_111616_ + 2) % 4) / 16.0F * .001F));
+ p_111615_[i + 4 + 1] = Float.floatToRawIntBits(p_111618_.getV(p_111619_.getV(p_111616_) / 16.0F * .999F + p_111619_.getV((p_111616_ + 2) % 4) / 16.0F * .001F));
}

private void applyElementRotation(Vector3f p_254412_, @Nullable BlockElementRotation p_254150_) {
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
this.dispatcher
.getModelRenderer()
.tesselateBlock(
@@ -46,7 +48,9 @@
@@ -42,11 +44,13 @@
blockstate,
blockpos,
p_114637_,
- p_114638_.getBuffer(ItemBlockRenderTypes.getMovingBlockRenderType(blockstate)),
+ p_114638_.getBuffer(net.neoforged.neoforge.client.RenderTypeHelper.getMovingBlockRenderType(renderType)),
false,
RandomSource.create(),
blockstate.getSeed(p_114634_.getStartPos()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
this.animatedTextures = List.copyOf(list1);
}
+
+ net.neoforged.neoforge.client.ClientHooks.onTextureStitchedPost(this);
+ net.neoforged.neoforge.client.ClientHooks.onTextureAtlasStitched(this);
}

@Override
Expand Down
Loading

0 comments on commit 2828efe

Please sign in to comment.