mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 08:33:42 +01:00
Update StationTileEntity.java
- Fixed bogey placement voiding block drops
This commit is contained in:
parent
945de771cf
commit
f5bef9ee12
1 changed files with 9 additions and 1 deletions
|
@ -268,8 +268,16 @@ public class StationTileEntity extends SmartTileEntity implements ITransformable
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BlockPos targetPos = pos.offset(up);
|
||||||
|
if (level.getBlockState(targetPos)
|
||||||
|
.getDestroySpeed(level, targetPos) == -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
level.destroyBlock(targetPos, true);
|
||||||
|
|
||||||
BlockState bogeyAnchor = ProperWaterloggedBlock.withWater(level, track.getBogeyAnchor(level, pos, state), pos);
|
BlockState bogeyAnchor = ProperWaterloggedBlock.withWater(level, track.getBogeyAnchor(level, pos, state), pos);
|
||||||
level.setBlock(pos.offset(up), bogeyAnchor, 3);
|
level.setBlock(targetPos, bogeyAnchor, 3);
|
||||||
player.displayClientMessage(Lang.translate("train_assembly.bogey_created"), true);
|
player.displayClientMessage(Lang.translate("train_assembly.bogey_created"), true);
|
||||||
SoundType soundtype = bogeyAnchor.getBlock()
|
SoundType soundtype = bogeyAnchor.getBlock()
|
||||||
.getSoundType(state, level, pos, player);
|
.getSoundType(state, level, pos, player);
|
||||||
|
|
Loading…
Reference in a new issue