mirror of
https://github.com/ayabusa/Modern-Chunk-Detector.git
synced 2024-11-23 10:43:25 +00:00
Updated to 1.21
This commit is contained in:
parent
44ffdeab6d
commit
4dfa1476a5
@ -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
|
||||||
yarn_mappings=1.20.6+build.3
|
yarn_mappings=1.21+build.9
|
||||||
loader_version=0.15.11
|
loader_version=0.15.11
|
||||||
|
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=1.1
|
mod_version=1.1+1.21
|
||||||
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.100.8+1.21
|
||||||
|
|
||||||
# Java
|
# Java
|
||||||
org.gradle.java.home=C:\\Users\\Leon\\.jdks\\corretto-21.0.3
|
org.gradle.java.home=C:\\Users\\Leon\\.jdks\\corretto-21.0.3
|
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
|
||||||
|
}
|
||||||
|
}
|
@ -124,70 +124,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.getTopY(); 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.getTopY(); 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": "*"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user