Skip to content

Commit

Permalink
port to 1.18-pre2, update gradle, adjust to worldmesher package rename
Browse files Browse the repository at this point in the history
  • Loading branch information
gliscowo committed Nov 17, 2021
1 parent a8510c3 commit d40b7ab
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 42 deletions.
19 changes: 9 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ plugins {
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
// TODO upgrade this
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version + "-" + project.minecraft_version
version = "${project.mod_version}+${project.minecraft_base_version}"
group = project.maven_group

minecraft {
accessWidener file("src/main/resources/isometricrenders.accesswidener")
loom {
setAccessWidenerPath(file("src/main/resources/isometricrenders.accesswidener"))
}

repositories {
flatDir {
dirs 'libs'
}
maven { url "https://maven.wispforest.io"}
}

dependencies {
Expand All @@ -31,8 +30,8 @@ dependencies {

// modImplementation "com.ptsmods:devlogin:1.2"

modImplementation "com.glisco:worldmesher-0.1-21w39a"
include "com.glisco:worldmesher-0.1-21w39a"
modImplementation "io.wispforest:worldmesher:${project.worldmesher_version}"
include "io.wispforest:worldmesher:${project.worldmesher_version}"
}

processResources {
Expand Down
14 changes: 9 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=21w39a
yarn_mappings=21w39a+build.4
loader_version=0.11.7
minecraft_base_version=1.18
minecraft_version=1.18-pre2
yarn_mappings=1.18-pre2+build.4
loader_version=0.12.5
# Mod Properties
mod_version=0.2.7
mod_version=0.2.9
maven_group=com.glisco
archives_base_name=isometric-renders
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.40.5+1.18
fabric_version=0.42.5+1.18

# https://maven.wispforest.io/io/wispforest/worldmesher/
worldmesher_version=0.2.1+1.18
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradlew
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
Expand Down
21 changes: 3 additions & 18 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand All @@ -54,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
Expand All @@ -64,29 +64,14 @@ echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.glisco.isometricrenders.client.gui;

import com.glisco.worldmesher.WorldMesh;
import com.glisco.worldmesher.WorldMesh.Builder;
import com.mojang.blaze3d.systems.RenderSystem;
import io.wispforest.worldmesher.WorldMesh;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.render.VertexConsumerProvider;
Expand Down Expand Up @@ -78,7 +77,7 @@ public static class AreaRenderCallback implements IsometricRenderHelper.RenderCa
private boolean scaleFramebuffer = true;

public AreaRenderCallback(BlockPos origin, BlockPos end, boolean translucencyEnabled) {
final Builder builder = new Builder(MinecraftClient.getInstance().world, origin, end);
final WorldMesh.Builder builder = new WorldMesh.Builder(MinecraftClient.getInstance().world, origin, end);
// builder.enableBlockEntities();
if (translucencyEnabled) {
builder.renderActions(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public static NativeImage renderIntoImage(int size, RenderCallback renderCallbac
modelStack.pop();

modelStack.loadIdentity();
modelStack.method_34425(modelMatrix);
modelStack.multiplyPositionMatrix(modelMatrix);
RenderSystem.applyModelViewMatrix();
modelStack.pop();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected void drawContent(MatrixStack matrices) {
entityRenderDispatcher.setRenderShadows(true);

modelStack.loadIdentity();
modelStack.method_34425(modelMatrix);
modelStack.multiplyPositionMatrix(modelMatrix);

RenderSystem.applyModelViewMatrix();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected void drawContent(MatrixStack matrices) {
immediate.draw();

modelStack.loadIdentity();
modelStack.method_34425(modelMatrix);
modelStack.multiplyPositionMatrix(modelMatrix);

RenderSystem.applyModelViewMatrix();

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/isometric-renders.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "com.glisco.isometricrenders.mixin",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_16",
"mixins": [
"BlockEntityAccessor",
"BlockStateArgumentAccessor",
Expand Down

0 comments on commit d40b7ab

Please sign in to comment.