|
1 | | -package me.cortex.voxy.client; |
2 | | - |
3 | | -import me.cortex.voxy.client.core.IGetVoxyRenderSystem; |
4 | | -import me.cortex.voxy.client.core.VoxyRenderSystem; |
5 | | -import me.cortex.voxy.commonImpl.VoxyCommon; |
6 | | -import net.minecraft.ChatFormatting; |
7 | | -import net.minecraft.client.Minecraft; |
8 | | -import net.minecraft.client.gui.components.debug.DebugScreenDisplayer; |
9 | | -import net.minecraft.client.gui.components.debug.DebugScreenEntry; |
10 | | -import net.minecraft.resources.ResourceLocation; |
11 | | -import net.minecraft.world.level.Level; |
12 | | -import net.minecraft.world.level.chunk.LevelChunk; |
13 | | -import org.jetbrains.annotations.Nullable; |
14 | | - |
15 | | -import java.util.ArrayList; |
16 | | -import java.util.List; |
17 | | - |
18 | | -public class VoxyDebugScreenEntry implements DebugScreenEntry { |
19 | | - @Override |
20 | | - public void display(DebugScreenDisplayer lines, @Nullable Level world, @Nullable LevelChunk clientChunk, @Nullable LevelChunk chunk) { |
21 | | - if (!VoxyCommon.isAvailable()) { |
22 | | - lines.addLine(ChatFormatting.RED + "voxy-"+VoxyCommon.MOD_VERSION);//Voxy installed, not avalible |
23 | | - return; |
24 | | - } |
25 | | - var instance = VoxyCommon.getInstance(); |
26 | | - if (instance == null) { |
27 | | - lines.addLine(ChatFormatting.YELLOW + "voxy-" + VoxyCommon.MOD_VERSION);//Voxy avalible, no instance active |
28 | | - return; |
29 | | - } |
30 | | - VoxyRenderSystem vrs = null; |
31 | | - var wr = Minecraft.getInstance().levelRenderer; |
32 | | - if (wr != null) vrs = ((IGetVoxyRenderSystem) wr).getVoxyRenderSystem(); |
33 | | - |
34 | | - //Voxy instance active |
35 | | - lines.addLine((vrs==null?ChatFormatting.DARK_GREEN:ChatFormatting.GREEN)+"voxy-"+VoxyCommon.MOD_VERSION); |
36 | | - |
37 | | - //lines.addLineToSection(); |
38 | | - List<String> instanceLines = new ArrayList<>(); |
39 | | - instance.addDebug(instanceLines); |
40 | | - lines.addToGroup(ResourceLocation.fromNamespaceAndPath("voxy", "instance_debug"), instanceLines); |
41 | | - |
42 | | - if (vrs != null) { |
43 | | - List<String> renderLines = new ArrayList<>(); |
44 | | - vrs.addDebugInfo(renderLines); |
45 | | - lines.addToGroup(ResourceLocation.fromNamespaceAndPath("voxy", "render_debug"), renderLines); |
46 | | - } |
47 | | - } |
48 | | - |
49 | | - |
50 | | -} |
| 1 | +// package me.cortex.voxy.client; |
| 2 | + |
| 3 | +// import me.cortex.voxy.client.core.IGetVoxyRenderSystem; |
| 4 | +// import me.cortex.voxy.client.core.VoxyRenderSystem; |
| 5 | +// import me.cortex.voxy.commonImpl.VoxyCommon; |
| 6 | +// import net.minecraft.ChatFormatting; |
| 7 | +// import net.minecraft.client.Minecraft; |
| 8 | +// import net.minecraft.client.gui.components.debug.DebugScreenDisplayer; |
| 9 | +// import net.minecraft.client.gui.components.debug.DebugScreenEntry; |
| 10 | +// import net.minecraft.resources.ResourceLocation; |
| 11 | +// import net.minecraft.world.level.Level; |
| 12 | +// import net.minecraft.world.level.chunk.LevelChunk; |
| 13 | +// import org.jetbrains.annotations.Nullable; |
| 14 | + |
| 15 | +// import java.util.ArrayList; |
| 16 | +// import java.util.List; |
| 17 | + |
| 18 | +// public class VoxyDebugScreenEntry implements DebugScreenEntry { |
| 19 | +// @Override |
| 20 | +// public void display(DebugScreenDisplayer lines, @Nullable Level world, @Nullable LevelChunk clientChunk, @Nullable LevelChunk chunk) { |
| 21 | +// if (!VoxyCommon.isAvailable()) { |
| 22 | +// lines.addLine(ChatFormatting.RED + "voxy-"+VoxyCommon.MOD_VERSION);//Voxy installed, not avalible |
| 23 | +// return; |
| 24 | +// } |
| 25 | +// var instance = VoxyCommon.getInstance(); |
| 26 | +// if (instance == null) { |
| 27 | +// lines.addLine(ChatFormatting.YELLOW + "voxy-" + VoxyCommon.MOD_VERSION);//Voxy avalible, no instance active |
| 28 | +// return; |
| 29 | +// } |
| 30 | +// VoxyRenderSystem vrs = null; |
| 31 | +// var wr = Minecraft.getInstance().levelRenderer; |
| 32 | +// if (wr != null) vrs = ((IGetVoxyRenderSystem) wr).getVoxyRenderSystem(); |
| 33 | + |
| 34 | +// //Voxy instance active |
| 35 | +// lines.addLine((vrs==null?ChatFormatting.DARK_GREEN:ChatFormatting.GREEN)+"voxy-"+VoxyCommon.MOD_VERSION); |
| 36 | + |
| 37 | +// //lines.addLineToSection(); |
| 38 | +// List<String> instanceLines = new ArrayList<>(); |
| 39 | +// instance.addDebug(instanceLines); |
| 40 | +// lines.addToGroup(ResourceLocation.fromNamespaceAndPath("voxy", "instance_debug"), instanceLines); |
| 41 | + |
| 42 | +// if (vrs != null) { |
| 43 | +// List<String> renderLines = new ArrayList<>(); |
| 44 | +// vrs.addDebugInfo(renderLines); |
| 45 | +// lines.addToGroup(ResourceLocation.fromNamespaceAndPath("voxy", "render_debug"), renderLines); |
| 46 | +// } |
| 47 | +// } |
| 48 | + |
| 49 | + |
| 50 | +// } |
0 commit comments