mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 13:09:59 +00:00
Fix up torch placement logic to handle more vanilla special-casing (#5426)
This commit is contained in:
1 parent
d1adf00158
commit
41d07e7aae
1 file changed
+11
-6
@@ -221,7 +221,7 @@
|
||||
public SoundType func_185467_w()
|
||||
{
|
||||
return this.field_149762_H;
|
||||
@@ -934,6 +952,1369 @@
|
||||
@@ -934,6 +952,1374 @@
|
||||
{
|
||||
}
|
||||
|
||||
@@ -837,13 +837,18 @@
|
||||
+ */
|
||||
+ public boolean canPlaceTorchOnTop(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ if (state.func_185896_q() || state.func_193401_d(world, pos, EnumFacing.UP) == BlockFaceShape.SOLID)
|
||||
+ if (this == Blocks.field_185775_db || this == Blocks.field_150428_aP)
|
||||
+ {
|
||||
+ return this != Blocks.field_185775_db && this != Blocks.field_150428_aP;
|
||||
+ return false;
|
||||
+ }
|
||||
+ else if (state.func_185896_q() || this instanceof BlockFence || this == Blocks.field_150359_w || this == Blocks.field_150463_bK || this == Blocks.field_150399_cn)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return this instanceof BlockFence || this == Blocks.field_150359_w || this == Blocks.field_150463_bK || this == Blocks.field_150399_cn;
|
||||
+ BlockFaceShape shape = state.func_193401_d(world, pos, EnumFacing.UP);
|
||||
+ return (shape == BlockFaceShape.SOLID || shape == BlockFaceShape.CENTER || shape == BlockFaceShape.CENTER_BIG) && !func_193384_b(this);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@@ -1591,7 +1596,7 @@
|
||||
public static void func_149671_p()
|
||||
{
|
||||
func_176215_a(0, field_176230_a, (new BlockAir()).func_149663_c("air"));
|
||||
@@ -1105,7 +2486,7 @@
|
||||
@@ -1105,7 +2491,7 @@
|
||||
Block block11 = (new BlockQuartz()).func_149672_a(SoundType.field_185851_d).func_149711_c(0.8F).func_149663_c("quartzBlock");
|
||||
func_176219_a(155, "quartz_block", block11);
|
||||
func_176219_a(156, "quartz_stairs", (new BlockStairs(block11.func_176223_P().func_177226_a(BlockQuartz.field_176335_a, BlockQuartz.EnumType.DEFAULT))).func_149663_c("stairsQuartz"));
|
||||
@@ -1600,7 +1605,7 @@
|
||||
func_176219_a(158, "dropper", (new BlockDropper()).func_149711_c(3.5F).func_149672_a(SoundType.field_185851_d).func_149663_c("dropper"));
|
||||
func_176219_a(159, "stained_hardened_clay", (new BlockStainedHardenedClay()).func_149711_c(1.25F).func_149752_b(7.0F).func_149672_a(SoundType.field_185851_d).func_149663_c("clayHardenedStained"));
|
||||
func_176219_a(160, "stained_glass_pane", (new BlockStainedGlassPane()).func_149711_c(0.3F).func_149672_a(SoundType.field_185853_f).func_149663_c("thinStainedGlass"));
|
||||
@@ -1230,31 +2611,6 @@
|
||||
@@ -1230,31 +2616,6 @@
|
||||
block15.field_149783_u = flag;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user