Fixing logic in getCurrentRailPosition to correctly identify the rail… (#7276)

This commit is contained in:
NoahBeech authored and GitHub committed 2020-09-08 13:23:18 -07:00
1 parent 887bc37209
commit a477671c03
1 file changed
+2 -2
@@ -55,8 +55,8 @@ public interface IForgeEntityMinecart
int x = MathHelper.floor(getMinecart().getPosX());
int y = MathHelper.floor(getMinecart().getPosY());
int z = MathHelper.floor(getMinecart().getPosZ());
BlockPos pos = new BlockPos(x, y - 1, z);
if (getMinecart().world.getBlockState(pos).func_235714_a_(BlockTags.RAILS)) pos = pos.down();
BlockPos pos = new BlockPos(x, y, z);
if (getMinecart().world.getBlockState(pos.down()).func_235714_a_(BlockTags.RAILS)) pos = pos.down();
return pos;
}