Fixing logic in getCurrentRailPosition to correctly identify the rail… (#7276)
This commit is contained in:
parent
887bc37209
commit
a477671c03
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue