diff --git a/patches/server/0439-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/0439-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index 0f114ace6d..31d644b1de 100644 --- a/patches/server/0439-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/patches/server/0439-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -170,3 +170,21 @@ index a087eec747bb355afd627c6042d20440c3e43e1b..bea9c7ac0fe08c3ca3309e8311f192cc } public boolean isSolidRender(BlockGetter world, BlockPos pos) { +diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +index d5ba2e679ed1858ea18e18feffce50544ae036c2..ca3e143e641933fa6b9499bbaaa1836877d90c52 100644 +--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java ++++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +@@ -209,6 +209,13 @@ public class PortalForcer { + for (int j = -1; j < 3; ++j) { + for (int k = -1; k < 4; ++k) { + temp.setWithOffset((Vec3i) pos, portalDirection.getStepX() * j + enumdirection1.getStepX() * distanceOrthogonalToPortal, k, portalDirection.getStepZ() * j + enumdirection1.getStepZ() * distanceOrthogonalToPortal); ++ // Paper start - prevent destroying unbreakable blocks ++ if (!com.destroystokyo.paper.PaperConfig.allowBlockPermanentBreakingExploits) { ++ if (!this.level.getBlockState(temp).isDestroyable()) { ++ return false; ++ } ++ } ++ // Paper end - prevent destroying unbreakable blocks + if (k < 0 && !this.level.getBlockState(temp).getMaterial().isSolid()) { + return false; + }