Skip to content

Commit afdaa62

Browse files
Update to 1.21.11
1 parent e540f44 commit afdaa62

12 files changed

Lines changed: 120 additions & 160 deletions

File tree

gradle.properties

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,35 @@ org.gradle.warning.mode=fail
88
# Fabric Properties
99
# check these at https://fabricmc.net/develop/ and
1010
# https://modrinth.com/mod/fabric-api/versions
11-
minecraft_version=1.21.10
12-
yarn_mappings=1.21.10+build.3
11+
minecraft_version=1.21.11
12+
yarn_mappings=1.21.11+build.4
1313
loader_version=0.18.4
1414
loom_version=1.14-SNAPSHOT
1515

1616
# Fabric API
17-
fabric_api_version=0.138.4+1.21.10
17+
fabric_api_version=0.140.2+1.21.11
1818

1919
# Mod Properties
20-
mod_version=1.4.1-MC1.21.10-Fabric
20+
mod_version=1.4.1-MC1.21.11-Fabric
2121
maven_group=net.wimods.chestesp
2222
archives_base_name=ChestESP
2323
mod_loader=Fabric
2424

2525
# CurseForge
2626
cf_project_id=870203
27-
cf_game_version=1.21.10
27+
cf_game_version=1.21.11
2828

2929
# GitHub
3030
gh_repo_id=Wurst-Imperium/ChestESP
3131
mcx_repo_id=Wurst-Imperium-MCX/ChestESP
3232

3333
# Dependencies
34-
# check at https://modrinth.com/mod/modmenu/versions?g=1.21.10
35-
modmenu_version=16.0.0-rc.2
36-
# check at https://modrinth.com/mod/cloth-config/versions?l=fabric&g=1.21.10
37-
cloth_config_version=20.0.149
38-
# check at https://modrinth.com/mod/lootr/versions?l=fabric&g=1.21.10
39-
lootr_version=tBqlJU85
40-
# ^ that's fabric-1.21.10-1.18.32.99
34+
# check at https://modrinth.com/mod/modmenu/versions?g=1.21.11
35+
modmenu_version=17.0.0-beta.1
36+
# check at https://modrinth.com/mod/cloth-config/versions?l=fabric&g=1.21.11
37+
cloth_config_version=21.11.153
38+
# check at https://modrinth.com/mod/lootr/versions?l=fabric&g=1.21.11
39+
lootr_version=NKsNpTwe
40+
# ^ that's fabric-1.21.11-1.19.33.100
4141
# turn off if Lootr is not yet available for the current Minecraft version
4242
do_mod_compat_test=true

src/gametest/java/net/wimods/chestesp/gametest/ChestESPTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import net.fabricmc.fabric.api.client.gametest.v1.world.TestWorldBuilder;
2727
import net.minecraft.SharedConstants;
2828
import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState;
29-
import net.minecraft.world.level.GameRules;
29+
import net.minecraft.world.level.gamerules.GameRules;
3030
import net.wimods.chestesp.ChestEspConfig;
3131
import net.wimods.chestesp.ChestEspMod;
3232

@@ -84,8 +84,8 @@ public void runTest(ClientGameTestContext context)
8484
String mcVersion = SharedConstants.getCurrentVersion().name();
8585
creator.setName("E2E Test " + mcVersion);
8686
creator.setGameMode(WorldCreationUiState.SelectedGameMode.CREATIVE);
87-
creator.getGameRules().getRule(GameRules.RULE_SENDCOMMANDFEEDBACK)
88-
.set(false, null);
87+
creator.getGameRules().set(GameRules.SEND_COMMAND_FEEDBACK, false,
88+
null);
8989
});
9090

9191
try(TestSingleplayerContext spContext = worldBuilder.create())

src/main/java/net/wimods/chestesp/ChestEspMod.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
2222
import net.minecraft.client.KeyMapping;
2323
import net.minecraft.client.Minecraft;
24-
import net.minecraft.resources.ResourceLocation;
24+
import net.minecraft.resources.Identifier;
2525
import net.minecraft.world.phys.AABB;
2626
import net.minecraft.world.phys.Vec3;
2727
import net.wimods.chestesp.util.ChunkUtils;
@@ -49,8 +49,8 @@ public ChestEspMod()
4949

5050
groups = new ChestEspGroupManager(configHolder);
5151

52-
KeyMapping.Category kbCategory = KeyMapping.Category.register(
53-
ResourceLocation.fromNamespaceAndPath("chestesp", "chestesp"));
52+
KeyMapping.Category kbCategory = KeyMapping.Category
53+
.register(Identifier.fromNamespaceAndPath("chestesp", "chestesp"));
5454
toggleKey = KeyBindingHelper
5555
.registerKeyBinding(new KeyMapping("key.chestesp.toggle",
5656
InputConstants.UNKNOWN.getValue(), kbCategory));

src/main/java/net/wimods/chestesp/ChestEspPipelines.java

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
import com.mojang.blaze3d.platform.DepthTestFunction;
1414
import com.mojang.blaze3d.vertex.DefaultVertexFormat;
1515
import com.mojang.blaze3d.vertex.VertexFormat.Mode;
16+
1617
import net.minecraft.client.renderer.RenderPipelines;
17-
import net.minecraft.resources.ResourceLocation;
18+
import net.minecraft.resources.Identifier;
1819

1920
public enum ChestEspPipelines
2021
{
@@ -26,11 +27,11 @@ public enum ChestEspPipelines
2627
public static final Snippet FOGLESS_LINES_SNIPPET = RenderPipeline
2728
.builder(RenderPipelines.MATRICES_FOG_SNIPPET,
2829
RenderPipelines.GLOBALS_SNIPPET)
29-
.withVertexShader(ResourceLocation.parse("chestesp:core/fogless_lines"))
30-
.withFragmentShader(
31-
ResourceLocation.parse("chestesp:core/fogless_lines"))
30+
.withVertexShader(Identifier.parse("chestesp:core/fogless_lines"))
31+
.withFragmentShader(Identifier.parse("chestesp:core/fogless_lines"))
3232
.withBlend(BlendFunction.TRANSLUCENT).withCull(false)
33-
.withVertexFormat(DefaultVertexFormat.POSITION_COLOR_NORMAL, Mode.LINES)
33+
.withVertexFormat(DefaultVertexFormat.POSITION_COLOR_NORMAL_LINE_WIDTH,
34+
Mode.LINES)
3435
.buildSnippet();
3536

3637
/**
@@ -39,45 +40,23 @@ public enum ChestEspPipelines
3940
public static final RenderPipeline DEPTH_TEST_LINES =
4041
RenderPipelines.register(RenderPipeline.builder(FOGLESS_LINES_SNIPPET)
4142
.withLocation(
42-
ResourceLocation.parse("chestesp:pipeline/depth_test_lines"))
43+
Identifier.parse("chestesp:pipeline/depth_test_lines"))
4344
.build());
4445

4546
/**
4647
* Similar to the LINES ShaderPipeline, but with no depth test or fog.
4748
*/
4849
public static final RenderPipeline ESP_LINES =
4950
RenderPipelines.register(RenderPipeline.builder(FOGLESS_LINES_SNIPPET)
50-
.withLocation(ResourceLocation.parse("chestesp:pipeline/esp_lines"))
51-
.withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST).build());
52-
53-
/**
54-
* Similar to the LINE_STRIP ShaderPipeline, but with no fog.
55-
*/
56-
public static final RenderPipeline DEPTH_TEST_LINE_STRIP =
57-
RenderPipelines.register(RenderPipeline.builder(FOGLESS_LINES_SNIPPET)
58-
.withLocation(ResourceLocation
59-
.parse("chestesp:pipeline/depth_test_line_strip"))
60-
.withVertexFormat(DefaultVertexFormat.POSITION_COLOR_NORMAL,
61-
Mode.LINE_STRIP)
62-
.build());
63-
64-
/**
65-
* Similar to the LINE_STRIP ShaderPipeline, but with no depth test or fog.
66-
*/
67-
public static final RenderPipeline ESP_LINE_STRIP =
68-
RenderPipelines.register(RenderPipeline.builder(FOGLESS_LINES_SNIPPET)
69-
.withLocation(
70-
ResourceLocation.parse("chestesp:pipeline/esp_line_strip"))
71-
.withVertexFormat(DefaultVertexFormat.POSITION_COLOR_NORMAL,
72-
Mode.LINE_STRIP)
51+
.withLocation(Identifier.parse("chestesp:pipeline/esp_lines"))
7352
.withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST).build());
7453

7554
/**
7655
* Similar to the DEBUG_QUADS ShaderPipeline, but with culling enabled.
7756
*/
7857
public static final RenderPipeline QUADS = RenderPipelines
7958
.register(RenderPipeline.builder(RenderPipelines.DEBUG_FILLED_SNIPPET)
80-
.withLocation(ResourceLocation.parse("chestesp:pipeline/quads"))
59+
.withLocation(Identifier.parse("chestesp:pipeline/quads"))
8160
.withDepthTestFunction(DepthTestFunction.LEQUAL_DEPTH_TEST)
8261
.build());
8362

@@ -87,15 +66,6 @@ public enum ChestEspPipelines
8766
*/
8867
public static final RenderPipeline ESP_QUADS = RenderPipelines
8968
.register(RenderPipeline.builder(RenderPipelines.DEBUG_FILLED_SNIPPET)
90-
.withLocation(ResourceLocation.parse("chestesp:pipeline/esp_quads"))
91-
.withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST).build());
92-
93-
/**
94-
* Similar to the DEBUG_QUADS ShaderPipeline, but with no depth test.
95-
*/
96-
public static final RenderPipeline ESP_QUADS_NO_CULLING = RenderPipelines
97-
.register(RenderPipeline.builder(RenderPipelines.DEBUG_FILLED_SNIPPET)
98-
.withLocation(ResourceLocation.parse("chestesp:pipeline/esp_quads"))
99-
.withCull(false)
69+
.withLocation(Identifier.parse("chestesp:pipeline/esp_quads"))
10070
.withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST).build());
10171
}

src/main/java/net/wimods/chestesp/ChestEspRenderLayers.java

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,54 +7,49 @@
77
*/
88
package net.wimods.chestesp;
99

10-
import java.util.OptionalDouble;
11-
import net.minecraft.client.renderer.RenderStateShard;
12-
import net.minecraft.client.renderer.RenderType;
10+
import net.minecraft.client.renderer.rendertype.LayeringTransform;
11+
import net.minecraft.client.renderer.rendertype.OutputTarget;
12+
import net.minecraft.client.renderer.rendertype.RenderSetup;
13+
import net.minecraft.client.renderer.rendertype.RenderType;
1314

1415
public enum ChestEspRenderLayers
1516
{
1617
;
1718

1819
/**
19-
* Similar to {@link RenderType#lines()}, but with line width 2.
20+
* Similar to {@link RenderType#getLines()}, but with line width 2.
2021
*/
21-
public static final RenderType.CompositeRenderType LINES = RenderType
22-
.create("chestesp:lines", 1536, ChestEspPipelines.DEPTH_TEST_LINES,
23-
RenderType.CompositeState.builder()
24-
.setLineState(
25-
new RenderStateShard.LineStateShard(OptionalDouble.of(2)))
26-
.setLayeringState(RenderType.VIEW_OFFSET_Z_LAYERING)
27-
.setOutputState(RenderType.ITEM_ENTITY_TARGET)
28-
.createCompositeState(false));
22+
public static final RenderType LINES = RenderType.create("chestesp:lines",
23+
RenderSetup.builder(ChestEspPipelines.DEPTH_TEST_LINES)
24+
.setLayeringTransform(LayeringTransform.VIEW_OFFSET_Z_LAYERING)
25+
.setOutputTarget(OutputTarget.ITEM_ENTITY_TARGET)
26+
.createRenderSetup());
2927

3028
/**
31-
* Similar to {@link RenderType#lines()}, but with line width 2 and no
29+
* Similar to {@link RenderType#getLines()}, but with line width 2 and no
3230
* depth test.
3331
*/
34-
public static final RenderType.CompositeRenderType ESP_LINES = RenderType
35-
.create("chestesp:esp_lines", 1536, ChestEspPipelines.ESP_LINES,
36-
RenderType.CompositeState.builder()
37-
.setLineState(
38-
new RenderStateShard.LineStateShard(OptionalDouble.of(2)))
39-
.setLayeringState(RenderType.VIEW_OFFSET_Z_LAYERING)
40-
.setOutputState(RenderType.ITEM_ENTITY_TARGET)
41-
.createCompositeState(false));
32+
public static final RenderType ESP_LINES =
33+
RenderType.create("chestesp:esp_lines",
34+
RenderSetup.builder(ChestEspPipelines.ESP_LINES)
35+
.setLayeringTransform(LayeringTransform.VIEW_OFFSET_Z_LAYERING)
36+
.setOutputTarget(OutputTarget.ITEM_ENTITY_TARGET)
37+
.createRenderSetup());
4238

4339
/**
44-
* Similar to {@link RenderType#debugQuads()}, but with culling enabled.
40+
* Similar to {@link RenderType#getDebugQuads()}, but with culling enabled.
4541
*/
46-
public static final RenderType.CompositeRenderType QUADS = RenderType
47-
.create("chestesp:quads", 1536, false, true, ChestEspPipelines.QUADS,
48-
RenderType.CompositeState.builder().createCompositeState(false));
42+
public static final RenderType QUADS = RenderType.create("chestesp:quads",
43+
RenderSetup.builder(ChestEspPipelines.QUADS).sortOnUpload()
44+
.createRenderSetup());
4945

5046
/**
51-
* Similar to {@link RenderType#debugQuads()}, but with culling enabled
47+
* Similar to {@link RenderType#getDebugQuads()}, but with culling enabled
5248
* and no depth test.
5349
*/
54-
public static final RenderType.CompositeRenderType ESP_QUADS =
55-
RenderType.create("chestesp:esp_quads", 1536, false, true,
56-
ChestEspPipelines.ESP_QUADS,
57-
RenderType.CompositeState.builder().createCompositeState(false));
50+
public static final RenderType ESP_QUADS = RenderType.create(
51+
"chestesp:esp_quads", RenderSetup.builder(ChestEspPipelines.ESP_QUADS)
52+
.sortOnUpload().createRenderSetup());
5853

5954
/**
6055
* Returns either {@link #QUADS} or {@link #ESP_QUADS} depending on the

src/main/java/net/wimods/chestesp/groups/ChestBoatsGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import me.shedaniel.autoconfig.ConfigHolder;
1111
import net.minecraft.world.entity.Entity;
12-
import net.minecraft.world.entity.vehicle.AbstractChestBoat;
12+
import net.minecraft.world.entity.vehicle.boat.AbstractChestBoat;
1313
import net.wimods.chestesp.ChestEspConfig;
1414
import net.wimods.chestesp.ChestEspEntityGroup;
1515

src/main/java/net/wimods/chestesp/groups/ChestCartsGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import me.shedaniel.autoconfig.ConfigHolder;
1111
import net.minecraft.world.entity.Entity;
12-
import net.minecraft.world.entity.vehicle.MinecartChest;
12+
import net.minecraft.world.entity.vehicle.minecart.MinecartChest;
1313
import net.wimods.chestesp.ChestEspConfig;
1414
import net.wimods.chestesp.ChestEspEntityGroup;
1515

src/main/java/net/wimods/chestesp/groups/HopperCartsGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import me.shedaniel.autoconfig.ConfigHolder;
1111
import net.minecraft.world.entity.Entity;
12-
import net.minecraft.world.entity.vehicle.MinecartHopper;
12+
import net.minecraft.world.entity.vehicle.minecart.MinecartHopper;
1313
import net.wimods.chestesp.ChestEspConfig;
1414
import net.wimods.chestesp.ChestEspEntityGroup;
1515

0 commit comments

Comments
 (0)