From d22d9a5bd58976800a2dc2560212428ff90c5364 Mon Sep 17 00:00:00 2001 From: Nick1st Date: Fri, 19 Aug 2022 13:43:00 +0200 Subject: [PATCH] Fixed some null pointers, causing portals to not generate Fixes #1 Fixes #3 Fixes #4 --- .../java/qouteall/imm_ptl/core/portal/EndPortalEntity.java | 3 ++- .../core/portal/nether_portal/GeneralBreakablePortal.java | 2 +- .../imm_ptl/core/portal/nether_portal/NetherPortalEntity.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/EndPortalEntity.java b/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/EndPortalEntity.java index eb841b010..522000d52 100644 --- a/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/EndPortalEntity.java +++ b/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/EndPortalEntity.java @@ -23,13 +23,14 @@ import qouteall.imm_ptl.core.IPGlobal; import qouteall.imm_ptl.core.McHelper; import qouteall.imm_ptl.core.ducks.IEEntity; +import qouteall.imm_ptl.core.platform_specific.IPRegistry; import qouteall.q_misc_util.Helper; import qouteall.q_misc_util.MiscHelper; import java.util.Objects; public class EndPortalEntity extends Portal { - public static EntityType entityType; + public static EntityType entityType = IPRegistry.END_PORTAL.get(); // only used by scaled view type end portal private EndPortalEntity clientFakedReversePortal; diff --git a/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/nether_portal/GeneralBreakablePortal.java b/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/nether_portal/GeneralBreakablePortal.java index e6ad1072c..f833299e0 100644 --- a/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/nether_portal/GeneralBreakablePortal.java +++ b/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/nether_portal/GeneralBreakablePortal.java @@ -6,7 +6,7 @@ public class GeneralBreakablePortal extends BreakablePortalEntity { - public static EntityType entityType; + public static EntityType entityType = IPRegistry.GENERAL_BREAKABLE_PORTAL.get(); public GeneralBreakablePortal( EntityType entityType_1, diff --git a/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/nether_portal/NetherPortalEntity.java b/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/nether_portal/NetherPortalEntity.java index 1c1446ce8..e2d6217cb 100644 --- a/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/nether_portal/NetherPortalEntity.java +++ b/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/portal/nether_portal/NetherPortalEntity.java @@ -20,7 +20,7 @@ import java.util.Random; public class NetherPortalEntity extends BreakablePortalEntity { - public static EntityType entityType; + public static EntityType entityType = IPRegistry.NETHER_PORTAL_NEW.get(); public NetherPortalEntity( EntityType entityType_1,