use of net.minecraft.block.BedBlock in project minecolonies by ldtteam.
the class BuildingHospital method registerBlockPosition.
@Override
public void registerBlockPosition(@NotNull final BlockState blockState, @NotNull final BlockPos pos, @NotNull final World world) {
super.registerBlockPosition(blockState, pos, world);
BlockPos registrationPosition = pos;
if (blockState.getBlock() instanceof BedBlock) {
if (blockState.getValue(BedBlock.PART) == BedPart.FOOT) {
registrationPosition = registrationPosition.relative(blockState.getValue(BedBlock.FACING));
}
if (!bedMap.containsKey(registrationPosition)) {
bedMap.put(registrationPosition, 0);
}
}
}
Aggregations