From c162a41aa912437e07359dba64bc381930513803 Mon Sep 17 00:00:00 2001 From: Drex Date: Sat, 10 Feb 2024 13:21:14 +0100 Subject: [PATCH] Remove Expanded Storage compatibility Expanded Storage was removed from modrinth, which makes it impossible to use modrinths maven to maintain this compatibility --- CHANGELOG.md | 3 ++ README.md | 1 - build.gradle | 2 -- gradle.properties | 1 - .../expandedstorage/ContainerMixin.java | 29 ------------------- .../vanish/util/VanishMixinConfigPlugin.java | 5 +--- src/main/resources/vanish.mixins.json | 1 - 7 files changed, 4 insertions(+), 38 deletions(-) delete mode 100644 src/main/java/me/drex/vanish/mixin/compat/expandedstorage/ContainerMixin.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 8931440..34c0610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Tatar Translation (Thanks to Amirhan-Taipovjan-Greatest-I) - Prevent raid spawning +### Removed +- Expanded Storage compatibility + ## [1.5.1] - 2024-01-17 ### Added - `vanish_on_join` meta key diff --git a/README.md b/README.md index cf676a0..f9e736a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ - Bluemap support - Dynmap support - Hide sleep status -- Expanded Storage compatibility - Exclude vanished players from player count - Prevents block interactions (pressure plates, dripleaf, tripwire, farmland, redstone ore, sculk sensor/shrieker and turtle egg) - Prevents player vibrations (sculk sensor/shrieker and warden) diff --git a/build.gradle b/build.gradle index de4504e..9ce04d1 100644 --- a/build.gradle +++ b/build.gradle @@ -44,9 +44,7 @@ dependencies { implementation shadow("org.spongepowered:configurate-hocon:${project.configurate_hocon_version}") // Mod compat - modCompileOnly "maven.modrinth:styled-chat:${project.styled_chat_version}" - modCompileOnly "maven.modrinth:expanded-storage:${project.expanded_storage_version}" compileOnly "com.github.BlueMap-Minecraft:BlueMapAPI:${project.bluemap_api_version}" compileOnly "us.dynmap:DynmapCoreAPI:${project.dynmap_api_version}" } diff --git a/gradle.properties b/gradle.properties index 1f491e6..aa61bf2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,6 @@ player_data_api_version=0.4.0+1.20.3 translations_version=2.2.0+1.20.3-rc1 configurate_hocon_version=4.1.2 # Compat -expanded_storage_version=12.0.0 bluemap_api_version=v2.5.1 styled_chat_version=2.4.0+1.20.3 dynmap_api_version=3.5 diff --git a/src/main/java/me/drex/vanish/mixin/compat/expandedstorage/ContainerMixin.java b/src/main/java/me/drex/vanish/mixin/compat/expandedstorage/ContainerMixin.java deleted file mode 100644 index 0ee0c30..0000000 --- a/src/main/java/me/drex/vanish/mixin/compat/expandedstorage/ContainerMixin.java +++ /dev/null @@ -1,29 +0,0 @@ -package me.drex.vanish.mixin.compat.expandedstorage; - -import compasses.expandedstorage.impl.block.entity.BarrelBlockEntity; -import me.drex.vanish.api.VanishAPI; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.entity.player.Player; -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(value = {BarrelBlockEntity.class}, targets = "compasses/expandedstorage/impl/block/entity/extendable/InventoryBlockEntity$1") -public abstract class ContainerMixin { - - @Inject(method = "startOpen", at = @At("HEAD"), cancellable = true) - public void vanish_cancelOpenAnimation(Player player, CallbackInfo ci) { - if (player instanceof ServerPlayer serverPlayer && VanishAPI.isVanished(serverPlayer)) { - ci.cancel(); - } - } - - @Inject(method = "stopOpen", at = @At("HEAD"), cancellable = true) - public void vanish_cancelCloseAnimation(Player player, CallbackInfo ci) { - if (player instanceof ServerPlayer serverPlayer && VanishAPI.isVanished(serverPlayer)) { - ci.cancel(); - } - } - -} diff --git a/src/main/java/me/drex/vanish/util/VanishMixinConfigPlugin.java b/src/main/java/me/drex/vanish/util/VanishMixinConfigPlugin.java index 00110f4..ee53783 100644 --- a/src/main/java/me/drex/vanish/util/VanishMixinConfigPlugin.java +++ b/src/main/java/me/drex/vanish/util/VanishMixinConfigPlugin.java @@ -1,6 +1,5 @@ package me.drex.vanish.util; -import net.fabricmc.loader.api.FabricLoader; import org.objectweb.asm.tree.ClassNode; import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; import org.spongepowered.asm.mixin.extensibility.IMixinInfo; @@ -10,8 +9,6 @@ public class VanishMixinConfigPlugin implements IMixinConfigPlugin { - public static final boolean EXPANDED_STORAGE = FabricLoader.getInstance().isModLoaded("expandedstorage"); - @Override public void onLoad(String mixinPackage) { @@ -24,7 +21,7 @@ public String getRefMapperConfig() { @Override public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { - return EXPANDED_STORAGE || !mixinClassName.startsWith("me.drex.vanish.mixin.compat.expandedstorage"); + return true; } @Override diff --git a/src/main/resources/vanish.mixins.json b/src/main/resources/vanish.mixins.json index 2d02e4a..20902f3 100644 --- a/src/main/resources/vanish.mixins.json +++ b/src/main/resources/vanish.mixins.json @@ -27,7 +27,6 @@ "SleepStatusMixin", "VanishedServerPlayerMixin", "WardenMixin", - "compat.expandedstorage.ContainerMixin", "interaction.ChunkMapMixin", "interaction.FallOnBlockMixin", "interaction.InsideBlockMixin",