2019-09-16 00:04:54 +00:00
|
|
|
package org.geysermc.connector.network.translators.block;
|
|
|
|
|
|
|
|
import com.github.steveice10.mc.protocol.data.game.world.block.BlockState;
|
2019-09-21 07:42:44 +00:00
|
|
|
import org.geysermc.connector.console.GeyserLogger;
|
2019-10-10 00:11:50 +00:00
|
|
|
import org.geysermc.connector.utils.Toolbox;
|
2019-09-16 00:04:54 +00:00
|
|
|
|
|
|
|
public class BlockTranslator {
|
|
|
|
|
2019-10-10 00:11:50 +00:00
|
|
|
public BlockEntry getBedrockBlock(BlockState state) {
|
|
|
|
BlockEntry bedrockItem = Toolbox.BLOCK_ENTRIES.get(state.getId());
|
2019-09-16 00:04:54 +00:00
|
|
|
if (bedrockItem == null) {
|
2019-09-21 07:42:44 +00:00
|
|
|
GeyserLogger.DEFAULT.debug("Missing mapping for java block " + state.getId() + "/nPlease report this to Geyser.");
|
2019-10-10 00:11:50 +00:00
|
|
|
return Toolbox.BLOCK_ENTRIES.get(10); // so we can walk and not getting stuck x)
|
2019-09-16 00:04:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return bedrockItem;
|
|
|
|
}
|
|
|
|
}
|