tinycodinglm / mc /mc-0027.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 16)
d517dc9 verified
|
Raw History Blame Contribute Delete
1.08 kB
deepseek-harness trace
System You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing c...

You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies.

User

How do I use Fabric API events?

Assistant
java
UseBlockCallback.EVENT.register((player, world, hand, hitResult) -> {
    if (!world.isClient) {
        player.sendMessage(Text.literal("Clicked: " + hitResult.getBlockPos()));
    }
    return ActionResult.PASS;
});

ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> {
    handler.getPlayer().sendMessage(Text.literal("Welcome!"));
});