Skip to content

Commit 5af4f24

Browse files
committed
Added toString() into WorldRendererMixin when debug is enabled
1 parent 28172b6 commit 5af4f24

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* This file is part of FalseTweaks.
3+
*
4+
* Copyright (C) 2022-2024 FalsePattern
5+
* All Rights Reserved
6+
*
7+
* The above copyright notice and this permission notice shall be included
8+
* in all copies or substantial portions of the Software.
9+
*
10+
* FalseTweaks is free software: you can redistribute it and/or modify
11+
* it under the terms of the GNU Lesser General Public License as published by
12+
* the Free Software Foundation, either version 3 of the License, or
13+
* (at your option) any later version.
14+
*
15+
* FalseTweaks is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
* GNU Lesser General Public License for more details.
19+
*
20+
* You should have received a copy of the GNU Lesser General Public License
21+
* along with FalseTweaks. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
24+
package com.falsepattern.falsetweaks.mixin.mixins.client.debug;
25+
26+
import org.spongepowered.asm.mixin.Mixin;
27+
import org.spongepowered.asm.mixin.Shadow;
28+
29+
import net.minecraft.client.renderer.WorldRenderer;
30+
31+
@Mixin(WorldRenderer.class)
32+
public abstract class WorldRendererMixin {
33+
@Shadow
34+
public int posX;
35+
@Shadow
36+
public int posY;
37+
@Shadow
38+
public int posZ;
39+
40+
@Override
41+
public String toString() {
42+
return "WR[X:" + this.posX + "|Y:" + this.posY + "|Z:" + this.posZ + "]";
43+
}
44+
}

src/main/java/com/falsepattern/falsetweaks/mixin/plugin/standard/Mixin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ public enum Mixin implements IMixin {
366366

367367
//region Debug
368368
Debug_TileEntityRendererDispatcherMixin(Side.CLIENT, condition(() -> Debug.ENABLED), "debug.TileEntityRendererDispatcherMixin"),
369+
Debug_WorldRendererMixin(Side.CLIENT, condition(() -> Debug.ENABLED), "debug.WorldRendererMixin"),
369370
Debug_Occlusion_Neodymium_NeoRendererMixin(Side.CLIENT, THREADING.and(REQUIRE_OPTIFINE_WITH_SHADERS).and(require(NEODYMIUM)).and(condition(() -> Debug.ENABLED)), "debug.occlusion.neodymium.NeoRendererMixin"),
370371
Debug_Occlusion_Neodymium_GPUMemoryManagerMixin(Side.CLIENT, THREADING.and(require(NEODYMIUM)).and(condition(() -> Debug.ENABLED)), "debug.occlusion.neodymium.GPUMemoryManagerMixin"),
371372
//endregion Debug

0 commit comments

Comments
 (0)