9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-28 03:09:11 +00:00

[ci-skip] finish patches

This commit is contained in:
NONPLAYT
2023-03-21 20:54:44 +03:00
parent 747de0799b
commit 340edaf4d3
62 changed files with 597 additions and 176 deletions

View File

@@ -0,0 +1,27 @@
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 {