Skip to content

Commit 7f9a58b

Browse files
Update to 1.21.3
1 parent da86ec8 commit 7f9a58b

File tree

10 files changed

+52
-31
lines changed

10 files changed

+52
-31
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Skyblock Mod 1.10.6 for 1.21
2+
3+
Support for 1.21.3
4+
15
## Skyblock Mod 1.10.5 for 1.21
26

37
Prepare for removal of locraw from Skyblocker.

build.gradle

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
2-
id 'fabric-loom' version '1.7-SNAPSHOT'
2+
id 'fabric-loom' version '1.8-SNAPSHOT'
33
id 'maven-publish'
4-
id "me.modmuss50.mod-publish-plugin" version "0.5.1"
4+
id "me.modmuss50.mod-publish-plugin" version "0.8.1"
55
}
66

77
version = project.mod_version + '+' + project.minecraft_version
@@ -112,13 +112,19 @@ publishMods {
112112
projectId = "658094"
113113
projectSlug = "skyblockmod" // Required for discord webhook
114114
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
115-
minecraftVersions.add("1.21")
115+
minecraftVersionRange {
116+
start = "1.21.2"
117+
end = "1.21.3"
118+
}
116119
requires("fabric-api")
117120
}
118121
modrinth {
119122
projectId = "GTIrlvJk"
120123
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
121-
minecraftVersions.add("1.21")
124+
minecraftVersionRange {
125+
start = "1.21.2"
126+
end = "1.21.3"
127+
}
122128
}
123129
github {
124130
repository = "kevinthegreat1/SkyblockMod-Fabric"

gradle.properties

+12-9
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,22 @@ org.gradle.jvmargs = -Xmx1G
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/versions.html
6-
minecraft_version = 1.21
7-
yarn_mappings = 1.21+build.1
8-
loader_version = 0.15.11
6+
minecraft_version = 1.21.3
7+
yarn_mappings = 1.21.3+build.2
8+
loader_version = 0.16.9
99

1010
# Mod Properties
11-
mod_version = 1.10.5
11+
mod_version = 1.10.6
1212
maven_group = com.kevinthegreat.skyblockmod
1313
archives_base_name = skyblock-mod
1414

1515
# Dependencies
16-
fabric_version = 0.100.1+1.21
17-
modmenu_version = 11.0.0-beta.1
18-
skyblocker_version = v1.21.1+1.21
19-
jgit_version = 6.9.0.202403050737-r
20-
## Apache Commons Math (https://mvnrepository.com/artifact/org.apache.commons/commons-math3)
16+
fabric_version = 0.110.0+1.21.3
17+
# https://modrinth.com/mod/modmenu/versions
18+
modmenu_version = 12.0.0-beta.1
19+
# https://modrinth.com/mod/skyblocker-liap/versions
20+
skyblocker_version = 1.23.0-beta.1+1.21.3
21+
# https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit
22+
jgit_version = 7.0.0.202409031743-r
23+
# Apache Commons Math (https://mvnrepository.com/artifact/org.apache.commons/commons-math3)
2124
commons_math_version = 3.6.1

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.

src/main/java/com/kevinthegreat/skyblockmod/dungeons/DungeonMap.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import net.minecraft.client.MinecraftClient;
88
import net.minecraft.client.gui.DrawContext;
99
import net.minecraft.client.render.LightmapTextureManager;
10+
import net.minecraft.client.render.MapRenderState;
1011
import net.minecraft.client.render.VertexConsumerProvider;
1112
import net.minecraft.client.util.math.MatrixStack;
1213
import net.minecraft.component.DataComponentTypes;
@@ -18,6 +19,7 @@
1819

1920
public class DungeonMap {
2021
private final MapIdComponent DEFAULT_MAP_ID_COMPONENT = new MapIdComponent(1024);
22+
private static final MapRenderState MAP_RENDER_STATE = new MapRenderState();
2123
private MapIdComponent cachedMapIdComponent = null;
2224

2325
public void init() {
@@ -43,7 +45,8 @@ private void render(DrawContext context) {
4345
matrices.push();
4446
matrices.translate(options.dungeonMapX.getValue(), options.dungeonMapY.getValue(), 0);
4547
matrices.scale(scaling, scaling, 0f);
46-
client.gameRenderer.getMapRenderer().draw(matrices, vertices, mapId, state, false, LightmapTextureManager.MAX_LIGHT_COORDINATE);
48+
client.getMapRenderer().update(mapId, state, MAP_RENDER_STATE);
49+
client.getMapRenderer().draw(MAP_RENDER_STATE, matrices, vertices, false, LightmapTextureManager.MAX_LIGHT_COORDINATE);
4750
vertices.draw();
4851
matrices.pop();
4952
}

src/main/java/com/kevinthegreat/skyblockmod/misc/Fishing.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import net.minecraft.client.network.ClientPlayerEntity;
66
import net.minecraft.entity.player.PlayerEntity;
77
import net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket;
8+
import net.minecraft.registry.entry.RegistryEntry;
9+
import net.minecraft.sound.SoundEvent;
10+
import net.minecraft.sound.SoundEvents;
811
import net.minecraft.text.Text;
912
import net.minecraft.util.Formatting;
1013
import net.minecraft.util.math.MathHelper;
@@ -26,8 +29,8 @@ public void reset() {
2629

2730
public void onSound(PlaySoundS2CPacket packet) {
2831
MinecraftClient client = MinecraftClient.getInstance();
29-
String path = packet.getSound().value().getId().getPath();
30-
if (SkyblockMod.skyblockMod.options.fishing.getValue() && startTime != 0 && System.currentTimeMillis() >= startTime + 2000 && ("entity.generic.splash".equals(path) || "entity.player.splash".equals(path))) {
32+
RegistryEntry<SoundEvent> sound = packet.getSound();
33+
if (SkyblockMod.skyblockMod.options.fishing.getValue() && startTime != 0 && System.currentTimeMillis() >= startTime + 2000 && (sound.matchesId(SoundEvents.ENTITY_GENERIC_SPLASH.id()) || sound.matchesId(SoundEvents.ENTITY_PLAYER_SPLASH.id()))) {
3134
ClientPlayerEntity player = client.player;
3235
if (player != null && player.fishHook != null) {
3336
Vec3d soundToFishHook = player.fishHook.getPos().subtract(packet.getX(), 0, packet.getZ());

src/main/java/com/kevinthegreat/skyblockmod/misc/MythologicalRitual.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import net.minecraft.util.ActionResult;
2727
import net.minecraft.util.DyeColor;
2828
import net.minecraft.util.Hand;
29-
import net.minecraft.util.TypedActionResult;
3029
import net.minecraft.util.hit.BlockHitResult;
3130
import net.minecraft.util.math.BlockPos;
3231
import net.minecraft.util.math.Direction;
@@ -36,7 +35,8 @@
3635
import org.jetbrains.annotations.NotNull;
3736
import org.jetbrains.annotations.Nullable;
3837

39-
import java.util.*;
38+
import java.util.HashMap;
39+
import java.util.Map;
4040
import java.util.regex.Pattern;
4141

4242
import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.argument;
@@ -170,12 +170,12 @@ private ActionResult onInteractBlock(BlockPos pos) {
170170
return ActionResult.PASS;
171171
}
172172

173-
public TypedActionResult<ItemStack> onUseItem(PlayerEntity player, World world, Hand hand) {
173+
public ActionResult onUseItem(PlayerEntity player, World world, Hand hand) {
174174
ItemStack stack = player.getStackInHand(hand);
175175
if (isActive() && ItemUtils.getItemId(stack).equals("ANCESTRAL_SPADE")) {
176176
lastEchoTime = System.currentTimeMillis();
177177
}
178-
return TypedActionResult.pass(stack);
178+
return ActionResult.PASS;
179179
}
180180

181181
public void onChatMessage(Text message, boolean overlay) {

src/main/java/com/kevinthegreat/skyblockmod/mixins/FishingRodItemMixin.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
import net.minecraft.client.MinecraftClient;
55
import net.minecraft.entity.player.PlayerEntity;
66
import net.minecraft.item.FishingRodItem;
7-
import net.minecraft.item.ItemStack;
7+
import net.minecraft.util.ActionResult;
88
import net.minecraft.util.Hand;
9-
import net.minecraft.util.TypedActionResult;
109
import net.minecraft.world.World;
1110
import org.spongepowered.asm.mixin.Mixin;
1211
import org.spongepowered.asm.mixin.injection.At;
@@ -16,14 +15,14 @@
1615
@Mixin(FishingRodItem.class)
1716
public abstract class FishingRodItemMixin {
1817
@Inject(method = "use", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;incrementStat(Lnet/minecraft/stat/Stat;)V"))
19-
private void skyblockmod_onCast(World world, PlayerEntity user, Hand hand, CallbackInfoReturnable<TypedActionResult<ItemStack>> cir) {
18+
private void skyblockmod_onCast(World world, PlayerEntity user, Hand hand, CallbackInfoReturnable<ActionResult> cir) {
2019
if (SkyblockMod.skyblockMod.options.fishing.getValue() && user.equals(MinecraftClient.getInstance().player)) {
2120
SkyblockMod.skyblockMod.fishing.start(user);
2221
}
2322
}
2423

2524
@Inject(method = "use", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;playSound(Lnet/minecraft/entity/player/PlayerEntity;DDDLnet/minecraft/sound/SoundEvent;Lnet/minecraft/sound/SoundCategory;FF)V", ordinal = 0))
26-
private void skyblockmod_onReel(World world, PlayerEntity user, Hand hand, CallbackInfoReturnable<TypedActionResult<ItemStack>> cir) {
25+
private void skyblockmod_onReel(World world, PlayerEntity user, Hand hand, CallbackInfoReturnable<ActionResult> cir) {
2726
if (SkyblockMod.skyblockMod.options.fishing.getValue() && user.equals(MinecraftClient.getInstance().player)) {
2827
SkyblockMod.skyblockMod.fishing.reset();
2928
}

src/main/java/com/kevinthegreat/skyblockmod/util/RenderHelper.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext;
66
import net.minecraft.client.MinecraftClient;
77
import net.minecraft.client.font.TextRenderer;
8+
import net.minecraft.client.gl.ShaderProgramKeys;
89
import net.minecraft.client.render.*;
910
import net.minecraft.client.render.block.entity.BeaconBlockEntityRenderer;
1011
import net.minecraft.client.util.BufferAllocator;
@@ -33,6 +34,8 @@ public static void renderFilled(WorldRenderContext context, BlockPos pos, float[
3334
Vec3d camera = context.camera().getPos();
3435
Tessellator tessellator = RenderSystem.renderThreadTesselator();
3536

37+
RenderSystem.setShader(ShaderProgramKeys.POSITION_COLOR);
38+
RenderSystem.setShaderColor(1f, 1f, 1f, 1f);
3639
RenderSystem.enableBlend();
3740
RenderSystem.defaultBlendFunc();
3841
RenderSystem.disableCull();
@@ -43,7 +46,7 @@ public static void renderFilled(WorldRenderContext context, BlockPos pos, float[
4346
matrices.translate(-camera.getX(), -camera.getY(), -camera.getZ());
4447

4548
BufferBuilder buffer = tessellator.begin(VertexFormat.DrawMode.TRIANGLE_STRIP, VertexFormats.POSITION_COLOR);
46-
WorldRenderer.renderFilledBox(matrices, buffer, pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1, colorComponents[0], colorComponents[1], colorComponents[2], alpha);
49+
VertexRendering.drawFilledBox(matrices, buffer, pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1, colorComponents[0], colorComponents[1], colorComponents[2], alpha);
4750
BufferRenderer.drawWithGlobalProgram(buffer.end());
4851

4952
matrices.pop();
@@ -54,7 +57,7 @@ public static void renderFilled(WorldRenderContext context, BlockPos pos, float[
5457
public static void renderBeaconBeam(WorldRenderContext context, BlockPos pos, float[] colorComponents) {
5558
context.matrixStack().push();
5659
context.matrixStack().translate(pos.getX() - context.camera().getPos().x, pos.getY() - context.camera().getPos().y, pos.getZ() - context.camera().getPos().z);
57-
BeaconBlockEntityRendererInvoker.renderBeam(context.matrixStack(), context.consumers(), context.tickCounter().getTickDelta(true), context.world().getTime(), 0, BeaconBlockEntityRenderer.MAX_BEAM_HEIGHT, ColorHelper.Argb.fromFloats(1f, colorComponents[0], colorComponents[1], colorComponents[2]));
60+
BeaconBlockEntityRendererInvoker.renderBeam(context.matrixStack(), context.consumers(), context.tickCounter().getTickDelta(true), context.world().getTime(), 0, BeaconBlockEntityRenderer.MAX_BEAM_HEIGHT, ColorHelper.fromFloats(1f, colorComponents[0], colorComponents[1], colorComponents[2]));
5861
context.matrixStack().pop();
5962
}
6063

@@ -70,7 +73,7 @@ public static void renderOutline(WorldRenderContext context, Box box, float[] co
7073
Vec3d camera = context.camera().getPos();
7174
Tessellator tessellator = RenderSystem.renderThreadTesselator();
7275

73-
RenderSystem.setShader(GameRenderer::getRenderTypeLinesProgram);
76+
RenderSystem.setShader(ShaderProgramKeys.RENDERTYPE_LINES);
7477
RenderSystem.setShaderColor(1f, 1f, 1f, 1f);
7578
RenderSystem.lineWidth(lineWidth);
7679
RenderSystem.disableCull();
@@ -81,7 +84,7 @@ public static void renderOutline(WorldRenderContext context, Box box, float[] co
8184
matrices.translate(-camera.getX(), -camera.getY(), -camera.getZ());
8285

8386
BufferBuilder buffer = tessellator.begin(VertexFormat.DrawMode.LINES, VertexFormats.LINES);
84-
WorldRenderer.drawBox(matrices, buffer, box, colorComponents[0], colorComponents[1], colorComponents[2], 1f);
87+
VertexRendering.drawBox(matrices, buffer, box, colorComponents[0], colorComponents[1], colorComponents[2], 1f);
8588
BufferRenderer.drawWithGlobalProgram(buffer.end());
8689

8790
matrices.pop();
@@ -122,7 +125,7 @@ public static void renderLinesFromPoints(WorldRenderContext context, Vec3d[] poi
122125
GL11.glEnable(GL11.GL_LINE_SMOOTH);
123126
GL11.glHint(GL11.GL_LINE_SMOOTH_HINT, GL11.GL_NICEST);
124127

125-
RenderSystem.setShader(GameRenderer::getRenderTypeLinesProgram);
128+
RenderSystem.setShader(ShaderProgramKeys.RENDERTYPE_LINES);
126129
RenderSystem.setShaderColor(1f, 1f, 1f, 1f);
127130
RenderSystem.lineWidth(lineWidth);
128131
RenderSystem.enableBlend();

0 commit comments

Comments
 (0)