From 6be686c3f7b9628f873bd37ecf536d2bc34b63c4 Mon Sep 17 00:00:00 2001 From: qouteall Date: Sun, 16 Apr 2023 20:28:24 +0800 Subject: [PATCH] fix the bug caused by setting interactable to false in old versions --- src/main/java/qouteall/mini_scaled/MiniScaledPortal.java | 4 ++++ src/main/java/qouteall/mini_scaled/ScaleBoxGeneration.java | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/qouteall/mini_scaled/MiniScaledPortal.java b/src/main/java/qouteall/mini_scaled/MiniScaledPortal.java index 83ae0db..c477050 100644 --- a/src/main/java/qouteall/mini_scaled/MiniScaledPortal.java +++ b/src/main/java/qouteall/mini_scaled/MiniScaledPortal.java @@ -53,6 +53,10 @@ public MiniScaledPortal(EntityType entityType, Level world) { public void tick() { super.tick(); + // in old versions it set interactable to false. + // change it to true + setInteractable(true); + if (level.isClientSide()) { tickClient(); } diff --git a/src/main/java/qouteall/mini_scaled/ScaleBoxGeneration.java b/src/main/java/qouteall/mini_scaled/ScaleBoxGeneration.java index f642728..4989b09 100644 --- a/src/main/java/qouteall/mini_scaled/ScaleBoxGeneration.java +++ b/src/main/java/qouteall/mini_scaled/ScaleBoxGeneration.java @@ -130,7 +130,7 @@ private static void createScaleBoxPortals( portal.hasCrossPortalCollision = true; portal.portalTag = "mini_scaled:scaled_box"; PortalExtension.get(portal).adjustPositionAfterTeleport = true; - portal.setInteractable(false); + portal.setInteractable(true); portal.boxId = boxId; portal.generation = generation; portal.recordEntry = entry; @@ -143,7 +143,7 @@ private static void createScaleBoxPortals( reversePortal.fuseView = false; reversePortal.renderingMergable = true; reversePortal.hasCrossPortalCollision = true; - reversePortal.setInteractable(false); + reversePortal.setInteractable(true); reversePortal.boxId = boxId; reversePortal.generation = generation; reversePortal.recordEntry = entry;