9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-19 14:59:25 +00:00
Files
DivineMC/patches/server/0049-Allow-placing-rails-on-more-surfaces.patch
2023-03-21 20:54:44 +03:00

28 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: SoSeDiK <mrsosedik@gmail.com>
Date: Sun, 4 Dec 2022 21:57:07 +0200
Subject: [PATCH] Allow placing rails on more surfaces
diff --git a/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java b/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java
index a3f877bf03f75cbfbd128c856322bcd427b95d21..96860dc68c7e7c59c27465a74b833e189db9d85b 100644
--- a/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BaseRailBlock.java
@@ -51,7 +51,7 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl
@Override
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
- return canSupportRigidBlock(world, pos.below());
+ return canSupportCenter(world, pos.below(), Direction.UP); // Kiterino
}
@Override
@@ -86,6 +86,7 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl
}
private static boolean shouldBeRemoved(BlockPos pos, Level world, RailShape shape) {
+ if (canSupportCenter(world, pos.below(), Direction.UP)) return false; // Kiterino
if (!canSupportRigidBlock(world, pos.below())) {
return true;
} else {