Skip to content

Commit

Permalink
Update to 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
samolego committed Mar 21, 2024
1 parent 3682c4a commit 2552b2c
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 35 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.3-SNAPSHOT' apply false
id 'fabric-loom' version '1.5-SNAPSHOT' apply false
id 'org.quiltmc.quilt-mappings-on-loom' version '4.2.0' apply false
id "com.modrinth.minotaur" version "2.+" apply false
}
Expand Down
6 changes: 3 additions & 3 deletions bukkit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ dependencies {
compileOnly "com.google.code.gson:gson:2.8.9"
testCompileOnly("com.google.code.gson:gson:2.8.9") // todo
// And guava
compileOnly "com.google.guava:guava:31.0.1-jre"
testCompileOnly("com.google.guava:guava:31.0.1-jre")
compileOnly "com.google.guava:guava:33.0.0-jre"
testCompileOnly("com.google.guava:guava:33.0.0-jre")

// Logging
def logVersion = "2.17.0"
def logVersion = "2.19.0"
compileOnly "org.apache.logging.log4j:log4j-api:${logVersion}"
compileOnly "org.apache.logging.log4j:log4j-core:${logVersion}"
compileOnly "org.apache.logging.log4j:log4j-slf4j-impl:${logVersion}"
Expand Down
4 changes: 2 additions & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ dependencies {
// As in common we don't have Minecraft source, we still need gson for config
compileOnly "com.google.code.gson:gson:2.8.9"
// And guava
compileOnly "com.google.guava:guava:31.0.1-jre"
compileOnly "com.google.guava:guava:33.0.0-jre"

// Logging
def logVersion = "2.17.0"
def logVersion = "2.19.0"
compileOnly "org.apache.logging.log4j:log4j-api:${logVersion}"
compileOnly "org.apache.logging.log4j:log4j-core:${logVersion}"
compileOnly "org.apache.logging.log4j:log4j-slf4j-impl:${logVersion}"
Expand Down
2 changes: 1 addition & 1 deletion fabric-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repositories {
// for more information about repositories.
maven { url 'https://jitpack.io' }
maven { url 'https://maven.terraformersmc.com/releases' }
maven { url = "https://maven.isxander.dev/releases" }
maven { url 'https://maven.isxander.dev/releases' }
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.samo_lego.clientstorage.fabric_client.config;

import dev.isxander.yacl3.api.*;
import dev.isxander.yacl3.api.controller.EnumControllerBuilder;
import dev.isxander.yacl3.api.controller.TickBoxControllerBuilder;
import dev.isxander.yacl3.impl.controller.DoubleSliderControllerBuilderImpl;
import dev.isxander.yacl3.impl.controller.EnumControllerBuilderImpl;
import dev.isxander.yacl3.impl.controller.IntegerSliderControllerBuilderImpl;
import dev.isxander.yacl3.impl.controller.TickBoxControllerBuilderImpl;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
import net.minecraft.server.network.ServerGamePacketListenerImpl;
Expand Down Expand Up @@ -56,24 +56,24 @@ public static Screen createConfigScreen(@Nullable Screen parent) {
mainCategory.option(Option.<Boolean>createBuilder()
.name(Component.translatable("key.clientstorage.toggle_mod"))
.binding(true, () -> config.enabled, value -> config.enabled = value)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build());


mainCategory.option(Option.<Boolean>createBuilder()
.name(Component.translatable("settings.clientstorage.enable_caching"))
.description(OptionDescription.of(Component.translatable("tooltip.clientstorage.enable_caching")))
.binding(true, () -> config.enableCaching, value -> config.enableCaching = value)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build());


mainCategory.option(Option.<Boolean>createBuilder()
.name(Component.translatable("settings.clientstorage.focus_search"))
.description(OptionDescription.of(Component.translatable("tooltip.clientstorage.focus_search")))
.binding(false, () -> config.focusSearchBar, value -> config.focusSearchBar = value)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.controller(TickBoxControllerBuilder::create)
.build());


Expand All @@ -89,22 +89,22 @@ public static Screen createConfigScreen(@Nullable Screen parent) {
.name(Component.translatable("settings.clientstorage.allow_item_transfers"))
.description(OptionDescription.of(Component.translatable("tooltip.clientstorage.allow_item_transfers")))
.binding(true, () -> config.enableItemTransfers, value -> config.enableItemTransfers = value)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build());


mainCategory.option(Option.<Boolean>createBuilder()
.name(Component.translatable("settings.clientstorage.enable_block_search"))
.description(OptionDescription.of(Component.translatable("tooltip.clientstorage.enable_block_search")))
.binding(true, () -> config.enableBlocks, value -> config.enableBlocks = value)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build());

mainCategory.option(Option.<Boolean>createBuilder()
.name(Component.translatable("settings.clientstorage.enable_entity_search"))
.description(OptionDescription.of(Component.translatable("tooltip.clientstorage.enable_entity_search")))
.binding(true, () -> config.enableEntities, value -> config.enableEntities = value)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build());


Expand All @@ -113,15 +113,17 @@ public static Screen createConfigScreen(@Nullable Screen parent) {
.name(Component.translatable("settings.clientstorage.merge_same_stacks"))
.description(OptionDescription.of(Component.translatable("tooltip.clientstorage.merge_same_stacks")))
.binding(ItemBehaviour.ItemDisplayType.MERGE_ALL, () -> config.itemDisplayType, value -> config.itemDisplayType = value)
.controller(EnumControllerBuilderImpl::new)
.controller(opt -> EnumControllerBuilder.create(opt)
.enumClass(ItemBehaviour.ItemDisplayType.class))
.build());


displayCategory.option(Option.<ItemBehaviour.ItemDataTooltip>createBuilder()
.name(Component.translatable("settings.clientstorage.additional_tooltip"))
.description(OptionDescription.of(Component.translatable("tooltip.clientstorage.additional_tooltip")))
.binding(ItemBehaviour.ItemDataTooltip.ALWAYS_SHOW, () -> config.locationTooltip, value -> config.locationTooltip = value)
.controller(EnumControllerBuilderImpl::new)
.controller(opt -> EnumControllerBuilder.create(opt)
.enumClass(ItemBehaviour.ItemDataTooltip.class))
.build());

displayCategory.option(ButtonOption.createBuilder()
Expand All @@ -136,28 +138,28 @@ public static Screen createConfigScreen(@Nullable Screen parent) {
.name(Component.translatable("settings.clientstorage.inform_server_type"))
.description(OptionDescription.of(Component.translatable("tooltip.clientstorage.inform_server_type")))
.binding(true, () -> config.informServerType, value -> config.informServerType = value)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build());


messageCategory.option(Option.<Boolean>createBuilder()
.name(Component.translatable("settings.clientstorage.inform_search"))
.binding(true, () -> config.informSearch, value -> config.informSearch = value)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build());

messageCategory.option(Option.<Boolean>createBuilder()
.name(Component.translatable("generator.minecraft.debug_all_block_states"))
.binding(false, () -> config.debug, value -> config.debug = value)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build());

// Server sync
final var serverSyncOption = Option.<Boolean>createBuilder()
.name(Component.translatable("settings.clientstorage.sync_server_config"))
.description(OptionDescription.of(Component.translatable("tooltip.clientstorage.sync_server_config")))
.binding(true, () -> config.allowSyncServer(), config::setAllowSyncServer)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build();
serverSyncOption.setAvailable(FabricConfig.isNotOnServer()); // Only allow in main menu
serverSyncCategory.option(serverSyncOption);
Expand All @@ -174,7 +176,7 @@ public static Screen createConfigScreen(@Nullable Screen parent) {
.name(Component.translatable("settings.clientstorage.through_block"))
.description(OptionDescription.of(Component.translatable(key)))
.binding(true, config::lookThroughBlocks, config::setLookThroughBlocks)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build();

throughBlocks.setAvailable(allowThroughBlocks);
Expand Down Expand Up @@ -210,7 +212,8 @@ public static Screen createConfigScreen(@Nullable Screen parent) {
thresholdOption.setAvailable(true);
}
})
.controller(EnumControllerBuilderImpl::new)
.controller(opt -> EnumControllerBuilder.create(opt)
.enumClass(PacketLimiter.class))
.build());

customDelayOption.setAvailable(FabricConfig.limiter == PacketLimiter.CUSTOM);
Expand All @@ -225,7 +228,7 @@ public static Screen createConfigScreen(@Nullable Screen parent) {
.name(Component.translatable("settings.clientstorage.enable_presets"))
.description(OptionDescription.of(Component.translatable("tooltip.clientstorage.enable_presets")))
.binding(true, () -> config.storageMemory.enabled, value -> config.storageMemory.enabled = value)
.controller(TickBoxControllerBuilderImpl::new)
.controller(TickBoxControllerBuilder::create)
.build());

storagePresetsCategory.option(ButtonOption.createBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ public static void tryRecognizeServer() {
if (informed) return;

FabricConfig.limiter = getServerLimiter();

Minecraft client = Minecraft.getInstance();
var brand = client.getConnection().serverBrand().toLowerCase(Locale.ROOT);

if (FabricConfig.limiter != CUSTOM) {
if (config.informServerType && !client.hasSingleplayerServer()) {
Expand All @@ -43,6 +41,7 @@ public static void tryRecognizeServer() {
}
} else {
// Server type not recognized, inform player
var brand = client.getConnection().serverBrand().toLowerCase(Locale.ROOT);
ClientStorageFabric.displayMessage(Component.translatable("error.clientstorage.unknown_server",
Component.literal(brand).withStyle(ChatFormatting.GOLD)));
informed = true;
Expand Down
2 changes: 1 addition & 1 deletion fabric-client/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"depends": {
"fabricloader": ">=0.7.4",
"fabric-api": "*",
"yet_another_config_lib_v3": ">=3.0.1+1.20"
"yet_another_config_lib_v3": ">=3.2.2+1.20"
},
"custom": {
"loom:injected_interfaces": {
Expand Down
16 changes: 9 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.4
loader_version=0.14.22
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.7

#Fabric api
fabric_version=0.89.3+1.20.2
fabric_version=0.96.11+1.20.4

# Mod Properties
mod_version=2.2.3
mod_version=2.3.0
maven_group=org.samo_lego
archives_base_name=clientstorage
# Dependencies
modmenu_version=7.0.0
yacl_version=3.0.1+1.20
modmenu_version=9.0.0
yacl_version=3.3.2+1.20.4

0 comments on commit 2552b2c

Please sign in to comment.