mirror of
https://github.com/ayabusa/Modern-Chunk-Detector.git
synced 2025-12-19 22:37:54 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 20fc062b94 | |||
|
|
c4dd15a875 | ||
|
|
8eb7ace5cb | ||
| 4dfa1476a5 |
6
README.md
Normal file
6
README.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Modern Chunk Detector
|
||||||
|
This is a simple mc mod that detect if chunks were generated in recent verion or not
|
||||||
|
|
||||||
|
Download it from modrinth: https://modrinth.com/mod/modern-chunk-detector
|
||||||
|
|
||||||
|
If I forget to update, DM me on discord: @ayabusa_
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '1.7-SNAPSHOT'
|
id 'fabric-loom' version '1.14-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,17 +4,18 @@ org.gradle.parallel=true
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.20.6
|
minecraft_version=1.21.8
|
||||||
yarn_mappings=1.20.6+build.3
|
yarn_mappings=1.21.8+build.1
|
||||||
loader_version=0.15.11
|
loader_version=0.18.1
|
||||||
|
loom_version=1.14-SNAPSHOT
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=1.1
|
mod_version=1.1+1.21.8
|
||||||
maven_group=modern_chunk_detector
|
maven_group=modern_chunk_detector
|
||||||
archives_base_name=modern_chunk_detector
|
archives_base_name=modern_chunk_detector
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.100.4+1.20.6
|
fabric_version=0.136.1+1.21.8
|
||||||
|
|
||||||
# Java
|
# Java (You need to change this to your jdk path)
|
||||||
org.gradle.java.home=C:\\Users\\Leon\\.jdks\\corretto-21.0.3
|
org.gradle.java.home=/usr/lib/jvm/java-1.21.0-openjdk-amd64
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
13
gradlew
vendored
Normal file → Executable file
13
gradlew
vendored
Normal file → Executable file
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015-2021 the original authors.
|
# Copyright © 2015 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@@ -15,6 +15,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@@ -84,7 +86,7 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@@ -112,7 +114,6 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@@ -170,7 +171,6 @@ fi
|
|||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if "$cygwin" || "$msys" ; then
|
if "$cygwin" || "$msys" ; then
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
@@ -203,15 +203,14 @@ fi
|
|||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command:
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# and any embedded shellness will be escaped.
|
# and any embedded shellness will be escaped.
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|||||||
5
gradlew.bat
vendored
5
gradlew.bat
vendored
@@ -13,6 +13,8 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@@ -68,11 +70,10 @@ goto fail
|
|||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
22
remappedSrc/modern_chunk_detector/ModernChunkDetector.java
Normal file
22
remappedSrc/modern_chunk_detector/ModernChunkDetector.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package modern_chunk_detector;
|
||||||
|
|
||||||
|
import net.fabricmc.api.ModInitializer;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
public class ModernChunkDetector implements ModInitializer {
|
||||||
|
// This logger is used to write text to the console and the log file.
|
||||||
|
// It is considered best practice to use your mod id as the logger's name.
|
||||||
|
// That way, it's clear which mod wrote info, warnings, and errors.
|
||||||
|
public static final Logger LOGGER = LoggerFactory.getLogger("modern_chunk_detector");
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInitialize() {
|
||||||
|
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
||||||
|
// However, some things (like resources) may still be uninitialized.
|
||||||
|
// Proceed with mild caution.
|
||||||
|
|
||||||
|
LOGGER.info("Hello Fabric world!");
|
||||||
|
}
|
||||||
|
}
|
||||||
15
remappedSrc/modern_chunk_detector/mixin/ExampleMixin.java
Normal file
15
remappedSrc/modern_chunk_detector/mixin/ExampleMixin.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package modern_chunk_detector.mixin;
|
||||||
|
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(MinecraftServer.class)
|
||||||
|
public class ExampleMixin {
|
||||||
|
@Inject(at = @At("HEAD"), method = "loadWorld")
|
||||||
|
private void init(CallbackInfo info) {
|
||||||
|
// This code is injected into the start of MinecraftServer.loadWorld()V
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,8 +7,6 @@ import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
|||||||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
|
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
|
||||||
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext;
|
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext;
|
||||||
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents;
|
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents;
|
||||||
import net.fabricmc.fabric.api.renderer.v1.Renderer;
|
|
||||||
import net.fabricmc.fabric.api.renderer.v1.RendererAccess;
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.option.KeyBinding;
|
import net.minecraft.client.option.KeyBinding;
|
||||||
@@ -107,13 +105,13 @@ public class ModernChunkDetectorClient implements ClientModInitializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final MinecraftClient client = MinecraftClient.getInstance();
|
private final MinecraftClient client = MinecraftClient.getInstance();
|
||||||
private static final int DARK_CYAN = ColorHelper.Argb.getArgb(255, 0, 155, 155);
|
private static final int DARK_CYAN = ColorHelper.getArgb(255, 0, 155, 155);
|
||||||
private static final int YELLOW = ColorHelper.Argb.getArgb(255, 255, 255, 0);
|
private static final int YELLOW = ColorHelper.getArgb(255, 255, 255, 0);
|
||||||
|
|
||||||
public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, double cameraX, double cameraY, double cameraZ, ChunkPos chunkPos) {
|
public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, double cameraX, double cameraY, double cameraZ, ChunkPos chunkPos) {
|
||||||
Entity entity = this.client.gameRenderer.getCamera().getFocusedEntity();
|
Entity entity = this.client.gameRenderer.getCamera().getFocusedEntity();
|
||||||
float f = (float)((double)this.client.world.getBottomY() - cameraY);
|
float f = (float)((double)this.client.world.getBottomY() - cameraY);
|
||||||
float g = (float)((double)this.client.world.getTopY() - cameraY);
|
float g = (float)((double)this.client.world.getHeight() - cameraY);
|
||||||
|
|
||||||
float h = (float)((double)chunkPos.getStartX() - cameraX);
|
float h = (float)((double)chunkPos.getStartX() - cameraX);
|
||||||
float i = (float)((double)chunkPos.getStartZ() - cameraZ);
|
float i = (float)((double)chunkPos.getStartZ() - cameraZ);
|
||||||
@@ -124,70 +122,75 @@ public class ModernChunkDetectorClient implements ClientModInitializer {
|
|||||||
int k;
|
int k;
|
||||||
for(j = -16; j <= 32; j += 16) {
|
for(j = -16; j <= 32; j += 16) {
|
||||||
for(k = -16; k <= 32; k += 16) {
|
for(k = -16; k <= 32; k += 16) {
|
||||||
/*vertexConsumer.vertex(matrix4f, h + (float)j, f, i + (float)k).color(1.0F, 0.0F, 0.0F, 0.0F).next();
|
/*
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + (float)k).color(1.0F, 0.0F, 0.0F, 0.5F).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + (float)k).color(1.0F, 0.0F, 0.0F, 0.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + (float)k).color(1.0F, 0.0F, 0.0F, 0.5F).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + (float)k).color(1.0F, 0.0F, 0.0F, 0.5F);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + (float)k).color(1.0F, 0.0F, 0.0F, 0.0F).next();*/
|
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + (float)k).color(1.0F, 0.0F, 0.0F, 0.5F);
|
||||||
|
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + (float)k).color(1.0F, 0.0F, 0.0F, 0.0F);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(j = 2; j < 16; j += 2) {
|
for(j = 2; j < 16; j += 2) {
|
||||||
|
/*
|
||||||
k = j % 4 == 0 ? DARK_CYAN : YELLOW;
|
k = j % 4 == 0 ? DARK_CYAN : YELLOW;
|
||||||
/*vertexConsumer.vertex(matrix4f, h + (float)j, f, i).color(1.0F, 1.0F, 0.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, f, i).color(1.0F, 1.0F, 0.0F, 0.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, f, i).color(k).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, f, i).color(k);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, g, i).color(k).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, g, i).color(k);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, g, i).color(1.0F, 1.0F, 0.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, g, i).color(1.0F, 1.0F, 0.0F, 0.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + 16.0F).color(1.0F, 1.0F, 0.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + 16.0F).color(1.0F, 1.0F, 0.0F, 0.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + 16.0F).color(k).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + 16.0F).color(k);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + 16.0F).color(k).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + 16.0F).color(k);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + 16.0F).color(1.0F, 1.0F, 0.0F, 0.0F).next();*/
|
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + 16.0F).color(1.0F, 1.0F, 0.0F, 0.0F);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
for(j = 2; j < 16; j += 2) {
|
for(j = 2; j < 16; j += 2) {
|
||||||
|
/*
|
||||||
k = j % 4 == 0 ? DARK_CYAN : YELLOW;
|
k = j % 4 == 0 ? DARK_CYAN : YELLOW;
|
||||||
/*vertexConsumer.vertex(matrix4f, h, f, i + (float)j).color(1.0F, 1.0F, 0.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h, f, i + (float)j).color(1.0F, 1.0F, 0.0F, 0.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h, f, i + (float)j).color(k).next();
|
vertexConsumer.vertex(matrix4f, h, f, i + (float)j).color(k);
|
||||||
vertexConsumer.vertex(matrix4f, h, g, i + (float)j).color(k).next();
|
vertexConsumer.vertex(matrix4f, h, g, i + (float)j).color(k);
|
||||||
vertexConsumer.vertex(matrix4f, h, g, i + (float)j).color(1.0F, 1.0F, 0.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h, g, i + (float)j).color(1.0F, 1.0F, 0.0F, 0.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + 16.0F, f, i + (float)j).color(1.0F, 1.0F, 0.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h + 16.0F, f, i + (float)j).color(1.0F, 1.0F, 0.0F, 0.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + 16.0F, f, i + (float)j).color(k).next();
|
vertexConsumer.vertex(matrix4f, h + 16.0F, f, i + (float)j).color(k);
|
||||||
vertexConsumer.vertex(matrix4f, h + 16.0F, g, i + (float)j).color(k).next();
|
vertexConsumer.vertex(matrix4f, h + 16.0F, g, i + (float)j).color(k);
|
||||||
vertexConsumer.vertex(matrix4f, h + 16.0F, g, i + (float)j).color(1.0F, 1.0F, 0.0F, 0.0F).next();*/
|
vertexConsumer.vertex(matrix4f, h + 16.0F, g, i + (float)j).color(1.0F, 1.0F, 0.0F, 0.0F);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
float l;
|
float l;
|
||||||
for(j = this.client.world.getBottomY(); j <= this.client.world.getTopY(); j += 2) {
|
for(j = this.client.world.getBottomY(); j <= this.client.world.getHeight(); j += 2) {
|
||||||
|
|
||||||
l = (float)((double)j - cameraY);
|
l = (float)((double)j - cameraY);
|
||||||
int m = j % 8 == 0 ? DARK_CYAN : YELLOW;/*
|
int m = j % 8 == 0 ? DARK_CYAN : YELLOW;
|
||||||
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 1.0F, 0.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 0.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h, l, i).color(m).next();
|
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h, l, i + 16.0F).color(m).next();
|
vertexConsumer.vertex(matrix4f, h, l, i + 16.0F).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + 16.0F, l, i + 16.0F).color(m).next();
|
vertexConsumer.vertex(matrix4f, h + 16.0F, l, i + 16.0F).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + 16.0F, l, i).color(m).next();
|
vertexConsumer.vertex(matrix4f, h + 16.0F, l, i).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h, l, i).color(m).next();
|
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 1.0F, 0.0F, 0.0F).next();*/
|
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getDebugLineStrip(2.0));
|
vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getDebugLineStrip(2.0));
|
||||||
|
|
||||||
for(j = 0; j <= 16; j += 16) {
|
for(j = 0; j <= 16; j += 16) {
|
||||||
for(k = 0; k <= 16; k += 16) {
|
for(k = 0; k <= 16; k += 16) {
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + (float)k).color(1.0F, 0F, 1.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + (float)k).color(1.0F, 0F, 1.0F, 0.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + (float)k).color(1.0F, 0F, 1.0F, 1.0F).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, f, i + (float)k).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + (float)k).color(1.0F, 0F, 1.0F, 1.0F).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + (float)k).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + (float)k).color(1.0F, 0F, 1.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h + (float)j, g, i + (float)k).color(1.0F, 0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(j = this.client.world.getBottomY(); j <= this.client.world.getTopY(); j += 2) {
|
for(j = this.client.world.getBottomY(); j <= this.client.world.getHeight(); j += 16) {
|
||||||
l = (float)((double)j - cameraY);
|
l = (float)((double)j - cameraY);
|
||||||
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 0.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 1.0F).next();
|
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h, l, i + 16.0F).color(1.0F, 0F, 1.0F, 1.0F).next();
|
vertexConsumer.vertex(matrix4f, h, l, i + 16.0F).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + 16.0F, l, i + 16.0F).color(1.0F, 0F, 1.0F, 1.0F).next();
|
vertexConsumer.vertex(matrix4f, h + 16.0F, l, i + 16.0F).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h + 16.0F, l, i).color(1.0F, 0F, 1.0F, 1.0F).next();
|
vertexConsumer.vertex(matrix4f, h + 16.0F, l, i).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 1.0F).next();
|
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 1.0F);
|
||||||
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 0.0F).next();
|
vertexConsumer.vertex(matrix4f, h, l, i).color(1.0F, 0F, 1.0F, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.15.11",
|
"fabricloader": ">=0.15.11",
|
||||||
"minecraft": "~1.20.6",
|
"minecraft": ">=1.21",
|
||||||
"java": ">=21",
|
"java": ">=21",
|
||||||
"fabric-api": "*"
|
"fabric-api": "*"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user