// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.server.core.universe.world.commands.block;

import com.hypixel.hytale.server.core.command.system.CommandSender;
import com.hypixel.hytale.server.core.Message;
import com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType;
import com.hypixel.hytale.server.core.universe.world.chunk.WorldChunk;
import javax.annotation.Nonnull;
import com.hypixel.hytale.server.core.command.system.CommandContext;

public class BlockGetCommand extends SimpleBlockCommand
{
    public BlockGetCommand() {
        super("get", "server.commands.block.get.desc");
    }
    
    @Override
    protected void executeWithBlock(@Nonnull final CommandContext context, @Nonnull final WorldChunk chunk, final int x, final int y, final int z) {
        final CommandSender sender = context.sender();
        final int blockId = chunk.getBlock(x, y, z);
        final BlockType blockType = BlockType.getAssetMap().getAsset(blockId);
        final int support = chunk.getSupportValue(x, y, z);
        sender.sendMessage(Message.translation("server.commands.block.get.info").param("x", x).param("y", y).param("z", z).param("id", blockType.getId().toString()).param("blockId", blockId).param("support", support));
    }
}
