Skip to content

Commit

Permalink
Merge pull request #1030 from SkyblockerMod/1.21.2
Browse files Browse the repository at this point in the history
1.21.2/1.21.3
  • Loading branch information
AzureAaron authored Oct 28, 2024
2 parents 47d0444 + 9aabbd7 commit 3bb808e
Show file tree
Hide file tree
Showing 168 changed files with 1,545 additions and 645 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ body:
description: What version of Minecraft are you running? If you do not know what version you are using, look in the bottom left corner of the main menu in game.
options:
- "1.21.0/1.21.1"
- "1.21.2/1.21.3"
validations:
required: true
- type: input
id: skyblocker-version
attributes:
label: Skyblocker Version
description: What version of Skyblocker are you running? Every part is important! If you do not know what version you are using, look at the file name in your "mods" folder.
placeholder: ex. skyblocker-1.21.0+1.21.0.jar
placeholder: ex. skyblocker-1.22.2+1.21.3.jar
validations:
required: true
- type: textarea
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/crash_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ body:
description: What version of Minecraft are you running? If you do not know what version you are using, look in the bottom left corner of the main menu in game.
options:
- "1.21.0/1.21.1"
- "1.21.2/1.21.3"
validations:
required: true
- type: input
id: skyblocker-version
attributes:
label: Skyblocker Version
description: What version of Skyblocker are you running? Every part is important! If you do not know what version you are using, look at the file name in your "mods" folder.
placeholder: ex. skyblocker-1.21.0+1.21.0.jar
placeholder: ex. skyblocker-1.22.2+1.21.3.jar
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
\
[![Discord](https://img.shields.io/discord/879732108745125969?logo=discord&labelColor=cecece&color=7289DA&label=)](https://discord.com/invite/aNNJHQykck)

Hypixel Skyblock Mod for Minecraft 1.21 & 1.21.1
Hypixel Skyblock Mod for Minecraft 1.21.2 & 1.21.3

Installation guide is [here](https://github.com/SkyblockerMod/Skyblocker/wiki/installation) or use our [Modpack](https://modrinth.com/modpack/skyblocker-modpack)
## Features
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'maven-publish'
id "me.modmuss50.mod-publish-plugin" version "0.7.2"
id "me.modmuss50.mod-publish-plugin" version "0.7.4"
id "de.hysky.skyblocker.annotation-processor"
}

Expand Down
22 changes: 11 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ org.gradle.jvmargs=-Xmx1G -Dfile.encoding=UTF-8 -Duser.language=en -Duser.countr
org.gradle.parallel=true

# Fabric Properties (https://fabricmc.net/versions.html)
## 1.21.1
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.15.11
## 1.21.2
minecraft_version=1.21.3
yarn_mappings=1.21.3+build.2
loader_version=0.16.7

#Fabric api
## 1.21.1
fabric_api_version=0.102.1+1.21.1
## 1.21.2
fabric_api_version=0.106.1+1.21.3

# Minecraft Mods
## YACL (https://github.com/isXander/YetAnotherConfigLib)
yacl_version=3.5.0+1.21
yacl_version=3.6.1+1.21.2
## HM API (https://github.com/AzureAaron/hm-api)
hm_api_version=1.0.1+1.21.1
hm_api_version=1.0.1+1.21.2
## Mod Menu (https://modrinth.com/mod/modmenu/versions)
mod_menu_version = 11.0.0-beta.1
mod_menu_version = 12.0.0-beta.1
## REI (https://modrinth.com/mod/rei/versions?l=fabric)
rei_version = 13.0.666
rei_version = 17.0.789
## EMI (https://modrinth.com/mod/emi/versions)
emi_version = 1.1.10+1.21
## JEI (https://modrinth.com/mod/jei/versions)
Expand All @@ -39,7 +39,7 @@ legacy_item_dfu_version = 1.0.1+1.21.1

# Other Libraries
## JGit (https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit)
jgit_version = 6.10.0.202406032230-r
jgit_version = 7.0.0.202409031743-r
## Apache Commons Math (https://mvnrepository.com/artifact/org.apache.commons/commons-math3)
commons_math_version = 3.6.1
## Apache Commons Text (https://mvnrepository.com/artifact/org.apache.commons/commons-text)
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/de/hysky/skyblocker/SkyblockerScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.client.gui.screen.ConfirmLinkScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.*;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.screen.ScreenTexts;
import net.minecraft.text.OrderedText;
import net.minecraft.text.StringVisitable;
Expand Down Expand Up @@ -90,8 +91,8 @@ protected void init() {
}

@Override
protected void initTabNavigation() {
super.initTabNavigation();
protected void refreshWidgetPositions() {
super.refreshWidgetPositions();
this.layout.refreshPositions();
}

Expand All @@ -101,7 +102,6 @@ private void openConfig() {

@Override
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
this.renderBackground(context, mouseX, mouseY, delta);
super.render(context, mouseX, mouseY, delta);
}

Expand Down Expand Up @@ -130,7 +130,7 @@ public void renderWidget(DrawContext context, int mouseX, int mouseY, float delt
int iconY = y - 13;

context.drawTextWithShadow(textRenderer, orderedText, x, y, this.getTextColor());
context.drawTexture(this.icon, iconX, iconY, 0, 0, 32, 32, 32, 32);
context.drawTexture(RenderLayer::getGuiTextured, this.icon, iconX, iconY, 0, 0, 32, 32, 32, 32);
}

private OrderedText trim(Text text, int width) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/hysky/skyblocker/UpdateNotifications.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static void checkForNewVersion() {
.withUnderline(true)
.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, downloadLink)));

CLIENT.player.sendMessage(Constants.PREFIX.get().append(Text.translatable("skyblocker.updateNotifications.newUpdateMessage", versionText)));
CLIENT.player.sendMessage(Constants.PREFIX.get().append(Text.translatable("skyblocker.updateNotifications.newUpdateMessage", versionText)), false);
SystemToast.add(CLIENT.getToastManager(), TOAST_TYPE, Text.translatable("skyblocker.updateNotifications.newUpdateToast.title"), Text.stringifiedTranslatable("skyblocker.updateNotifications.newUpdateToast.description", newVersion.version()));
}
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public void registerCategories(@NotNull IRecipeCategoryRegistration registration

@Override
public void registerRecipes(@NotNull IRecipeRegistration registration) {
registration.getIngredientManager().addIngredientsAtRuntime(VanillaTypes.ITEM_STACK, ItemRepository.getItems());
//FIXME no clue what to replace any of this with, we can't use items as that does not work
/*registration.getIngredientManager().addIngredientsAtRuntime(VanillaTypes.ITEM_STACK, ItemRepository.getItems());
registration.addRecipes(skyblockCraftingRecipeCategory.getRecipeType(), ItemRepository.getRecipesStream().map(recipe ->
new RecipeEntry<CraftingRecipe>(recipe.getId(), new ShapedRecipe("", CraftingRecipeCategory.MISC, RawShapedRecipe.create(Map.of(
'a', Ingredient.ofStacks(recipe.getGrid().get(0)),
Expand All @@ -60,6 +61,6 @@ public void registerRecipes(@NotNull IRecipeRegistration registration) {
'h', Ingredient.ofStacks(recipe.getGrid().get(7)),
'i', Ingredient.ofStacks(recipe.getGrid().get(8))
), "abc", "def", "ghi"), recipe.getResult()))
).toList());
).toList());*/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@


import me.shedaniel.rei.api.common.category.CategoryIdentifier;
import me.shedaniel.rei.api.common.display.Display;
import me.shedaniel.rei.api.common.display.DisplaySerializer;
import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
import me.shedaniel.rei.api.common.entry.EntryIngredient;

import java.util.List;

import org.jetbrains.annotations.Nullable;

/**
* Skyblock Crafting Recipe display class for REI
*/
Expand Down Expand Up @@ -37,4 +41,10 @@ public int getHeight() {
public CategoryIdentifier<?> getCategoryIdentifier() {
return SkyblockerREIClientPlugin.SKYBLOCK;
}

@Override
@Nullable
public DisplaySerializer<? extends Display> getSerializer() {
return null;
}
}
2 changes: 1 addition & 1 deletion src/main/java/de/hysky/skyblocker/config/ConfigUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static BooleanControllerBuilder createBooleanController(Option<Boolean> o

@SuppressWarnings("unchecked")
public static <E extends Enum<E>> EnumControllerBuilder<E> createEnumCyclingListController(Option<E> opt) {
return EnumControllerBuilder.create(opt).enumClass((Class<E>) opt.binding().defaultValue().getClass());
return EnumControllerBuilder.create(opt).enumClass((Class<E>) opt.stateManager().get().getClass());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig
sound -> config.eventNotifications.reminderSound = sound)
.controller(ConfigUtils::createEnumCyclingListController)
.name(Text.translatable("skyblocker.config.eventNotifications.notificationSound"))
.listener((soundOption, sound) -> {
if (!shouldPlaySound) {
shouldPlaySound = true;
return;
}
if (sound.getSoundEvent() != null)
MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(sound.getSoundEvent(), 1f, 1f));
.addListener((soundOption, event) -> {
if (event == OptionEventListener.Event.STATE_CHANGE) {
if (!shouldPlaySound) {
shouldPlaySound = true;
return;
}
if (soundOption.pendingValue().getSoundEvent() != null)
MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(soundOption.pendingValue().getSoundEvent(), 1f, 1f));
}
})
.build())
.groups(createGroups(config))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig
.binding(defaults.general.itemTooltip.enableCraftingCost,
() -> config.general.itemTooltip.enableCraftingCost,
newValue -> config.general.itemTooltip.enableCraftingCost = newValue)
.listener((Option<GeneralConfig.Craft> ignored, GeneralConfig.Craft ignored2) -> CraftPriceTooltip.clearCache())
.addListener((ignored, event) -> {
if (event == OptionEventListener.Event.STATE_CHANGE) CraftPriceTooltip.clearCache();
})
.controller(ConfigUtils::createEnumCyclingListController)
.build())
.option(Option.<Boolean>createBuilder()
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/de/hysky/skyblocker/debug/Debug.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static void init() {
.stream()
.map(entity -> entity.writeNbt(new NbtCompound()))
.map(NbtHelper::toPrettyPrintedText)
.forEach(client.player::sendMessage);
.forEach(text -> client.player.sendMessage(text, false));
keyDown = true;
} else if (!dumpNearbyEntitiesKey.wasPressed() && keyDown) {
keyDown = false;
Expand All @@ -83,9 +83,9 @@ public static void init() {
Slot focusedSlot = ((HandledScreenAccessor) handledScreen).getFocusedSlot();
if (dumpHoveredItemKey.matchesKey(key, scancode) && client.player != null && focusedSlot != null && focusedSlot.hasStack()) {
if (!Screen.hasShiftDown()) {
client.player.sendMessage(Constants.PREFIX.get().append(Text.literal("Hovered Item: " + SkyblockerMod.GSON_COMPACT.toJson(ItemStack.CODEC.encodeStart(ItemStackComponentizationFixer.getRegistryLookup().getOps(JsonOps.INSTANCE), focusedSlot.getStack()).getOrThrow()))));
client.player.sendMessage(Constants.PREFIX.get().append(Text.literal("Hovered Item: " + SkyblockerMod.GSON_COMPACT.toJson(ItemStack.CODEC.encodeStart(ItemStackComponentizationFixer.getRegistryLookup().getOps(JsonOps.INSTANCE), focusedSlot.getStack()).getOrThrow()))), false);
} else {
client.player.sendMessage(Constants.PREFIX.get().append(Text.literal("Held Item NW Calcs: " + SkyblockerMod.GSON_COMPACT.toJson(Calculation.LIST_CODEC.encodeStart(JsonOps.INSTANCE, NetworthCalculator.getItemNetworth(focusedSlot.getStack()).calculations()).getOrThrow()))));
client.player.sendMessage(Constants.PREFIX.get().append(Text.literal("Held Item NW Calcs: " + SkyblockerMod.GSON_COMPACT.toJson(Calculation.LIST_CODEC.encodeStart(JsonOps.INSTANCE, NetworthCalculator.getItemNetworth(focusedSlot.getStack()).calculations()).getOrThrow()))), false);
}
}
});
Expand Down Expand Up @@ -136,4 +136,4 @@ private static LiteralArgumentBuilder<FabricClientCommandSource> dumpArmorStandH
return Command.SINGLE_SUCCESS;
});
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
package de.hysky.skyblocker.mixins;

import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import com.llamalad7.mixinextras.sugar.Local;
import com.mojang.blaze3d.systems.RenderSystem;

import de.hysky.skyblocker.config.SkyblockerConfigManager;
import de.hysky.skyblocker.config.configs.CrimsonIsleConfig;
import de.hysky.skyblocker.utils.Utils;
import net.minecraft.block.enums.CameraSubmersionType;
import net.minecraft.client.render.BackgroundRenderer;
import net.minecraft.client.render.Camera;
import net.minecraft.client.render.FogShape;
import net.minecraft.client.render.Fog;

import org.joml.Vector4f;
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(BackgroundRenderer.class)
public abstract class BackgroundRendererMixin {
Expand All @@ -21,8 +22,8 @@ public abstract class BackgroundRendererMixin {
* Moves fog farther away from the player when in the crimson isles.
* This sets it to be the same distance as what you would see in the overworld (every other skyblock island)
*/
@Inject(method = "applyFog", at = @At("RETURN"))
private static void applyFogModifyDistance(CallbackInfo ci, @Local(argsOnly = true) Camera camera, @Local(argsOnly = true) BackgroundRenderer.FogType fogType, @Local(argsOnly = true, ordinal = 0) float viewDistance, @Local(argsOnly = true) boolean thickFog) {
@ModifyReturnValue(method = "applyFog", at = @At("RETURN"))
private static Fog applyFogModifyDistance(Fog original, @Local(argsOnly = true) Camera camera, @Local(argsOnly = true) BackgroundRenderer.FogType fogType, @Local(argsOnly = true) Vector4f color, @Local(argsOnly = true, ordinal = 0) float viewDistance, @Local(argsOnly = true) boolean thickFog) {
final CameraSubmersionType cameraSubmersionType = camera.getSubmersionType();
CrimsonIsleConfig config = SkyblockerConfigManager.get().crimsonIsle;

Expand All @@ -34,9 +35,9 @@ private static void applyFogModifyDistance(CallbackInfo ci, @Local(argsOnly = tr
start = viewDistance - Math.clamp(viewDistance / 10.0f, 4.0f, 64.0f);
}

RenderSystem.setShaderFogStart(start);
RenderSystem.setShaderFogEnd(viewDistance);
RenderSystem.setShaderFogShape(FogShape.CYLINDER);
return new Fog(start, original.end(), original.shape(), original.red(), original.green(), original.blue(), original.alpha());
}

return original;
}
}
Loading

0 comments on commit 3bb808e

Please sign in to comment.