diff --git a/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/controller/BlockDataController.java b/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/controller/BlockDataController.java index df3f8b0f37..894ca03d33 100644 --- a/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/controller/BlockDataController.java +++ b/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/controller/BlockDataController.java @@ -1,5 +1,6 @@ package com.xzavier0722.mc.plugin.slimefun4.storage.controller; +import city.norain.slimefun4.utils.InventoryUtil; import com.xzavier0722.mc.plugin.slimefun4.storage.adapter.IDataSourceAdapter; import com.xzavier0722.mc.plugin.slimefun4.storage.callback.IAsyncReadCallback; import com.xzavier0722.mc.plugin.slimefun4.storage.common.DataScope; diff --git a/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/util/StorageCacheUtils.java b/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/util/StorageCacheUtils.java index 79a9575e6a..57df8ef797 100644 --- a/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/util/StorageCacheUtils.java +++ b/src/main/java/com/xzavier0722/mc/plugin/slimefun4/storage/util/StorageCacheUtils.java @@ -6,6 +6,7 @@ import com.xzavier0722.mc.plugin.slimefun4.storage.controller.ASlimefunDataContainer; import com.xzavier0722.mc.plugin.slimefun4.storage.controller.SlimefunBlockData; import com.xzavier0722.mc.plugin.slimefun4.storage.controller.SlimefunUniversalData; +import io.github.bakedlibs.dough.blocks.BlockPosition; import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; import io.github.thebusybiscuit.slimefun4.implementation.Slimefun; import java.util.HashSet; @@ -144,7 +145,7 @@ public static void removeData(Location loc, String key) { var uniData = getUniversalBlock(uuid); if (uniData != null) { - uniData.setLastPresent(l); + uniData.setLastPresent(new BlockPosition(l)); } return uniData; @@ -197,7 +198,7 @@ public static void removeData(Location loc, String key) { return null; } - uniData.setLastPresent(l); + uniData.setLastPresent(new BlockPosition(l)); return uniData.getUniversalMenu(); } diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java index 4b6bec69ff..b6f5787253 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java @@ -3,6 +3,7 @@ import com.xzavier0722.mc.plugin.slimefun4.storage.controller.SlimefunUniversalData; import com.xzavier0722.mc.plugin.slimefun4.storage.util.LocationUtils; import com.xzavier0722.mc.plugin.slimefun4.storage.util.StorageCacheUtils; +import io.github.bakedlibs.dough.blocks.BlockPosition; import io.github.bakedlibs.dough.chat.ChatInput; import io.github.bakedlibs.dough.common.ChatColors; import io.github.bakedlibs.dough.common.CommonPatterns; @@ -1071,7 +1072,7 @@ protected void move(Block from, BlockFace face, Block to) { }); from.setType(Material.AIR); - uniData.setLastPresent(to.getLocation()); + uniData.setLastPresent(new BlockPosition(to.getLocation())); uniData.getUniversalMenu().update(to.getLocation()); Slimefun.getTickerTask().enableTicker(to.getLocation(), uniData.getUUID());