From 5cddcc02806e5623945b1783b79c970bb25a9a26 Mon Sep 17 00:00:00 2001 From: Ben Staddon Date: Mon, 2 Oct 2017 23:58:30 +0100 Subject: [PATCH] Fix block and torch placement logic not matching vanilla (#4210) --- patches/minecraft/net/minecraft/block/Block.java.patch | 2 +- patches/minecraft/net/minecraft/block/BlockDoor.java.patch | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index 0376dc101..47d2db33b 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -837,7 +837,7 @@ + */ + public boolean canPlaceTorchOnTop(IBlockState state, IBlockAccess world, BlockPos pos) + { -+ if (state.func_193401_d(world, pos, EnumFacing.UP) == BlockFaceShape.SOLID) ++ if (state.func_185896_q() || state.func_193401_d(world, pos, EnumFacing.UP) == BlockFaceShape.SOLID) + { + return this != Blocks.field_185775_db && this != Blocks.field_150428_aP; + } diff --git a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch index 1c888dfcc..0494a60c4 100644 --- a/patches/minecraft/net/minecraft/block/BlockDoor.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockDoor.java.patch @@ -9,7 +9,7 @@ { p_189540_2_.func_175698_g(p_189540_3_); flag1 = true; -@@ -247,13 +247,13 @@ +@@ -247,13 +247,14 @@ public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_) { @@ -21,7 +21,8 @@ else { - return p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_185896_q() && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a()); -+ return p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_193401_d(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP) == BlockFaceShape.SOLID && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a()); ++ IBlockState state = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()); ++ return (state.func_185896_q() || state.func_193401_d(p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP) == BlockFaceShape.SOLID) && super.func_176196_c(p_176196_1_, p_176196_2_) && super.func_176196_c(p_176196_1_, p_176196_2_.func_177984_a()); } }