From c74319fddb6294c3a40d5b1e637ec6052940262e Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Mon, 23 Dec 2024 17:17:10 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Changes=20related=20to=20ne?= =?UTF-8?q?w=20support=20for=20automation=20entities=20in=20Storage's=20ho?= =?UTF-8?q?pper=20upgrade.=20Basically=20this=20makes=20backpacks=20compat?= =?UTF-8?q?ible=20with=20the=20latest=20core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 4 ++-- .../common/gui/BackpackContainer.java | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index fd47c2f4..68bb939c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ loader_version_range=[4,) mod_id=sophisticatedbackpacks mod_name=Sophisticated Backpacks mod_license=GNU General Public License v3.0 -mod_version=3.20.28 +mod_version=3.20.29 mod_group_id=sophisticatedbackpacks mod_authors=P3pp3rF1y, Ridanisaurus mod_description=Fancy and functional backpacks. @@ -34,7 +34,7 @@ chipped_cf_file_id=5506938 resourcefullib_cf_file_id=5483169 athena_cf_file_id=5431579 curios_cf_file_id=5546342 -sc_version=[1.21-1.0.4,1.22) +sc_version=[1.21-1.0.5,1.22) #publish curseforge_id=422301 diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/common/gui/BackpackContainer.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/common/gui/BackpackContainer.java index 1ccc9e4e..f6f3ec33 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/common/gui/BackpackContainer.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/common/gui/BackpackContainer.java @@ -5,6 +5,7 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.Slot; @@ -56,6 +57,11 @@ public Optional getBlockPosition() { return Optional.empty(); } + @Override + public Optional getEntity() { + return Optional.of(player); + } + @Override protected void sendStorageSettingsToClient() { if (player.level().isClientSide) {