NFT-fabric is a Minecraft mod for Fabric 1.18.1 which lets you connect to the blockchain and take NFTs into Minecraft.
Press "N" in-game to view the NFTs you own. Left click on any NFT, you will get the item of the NFT.
Hold this NFT item, right-click on any wall, and the NFT will be hung on the wall. All players can appreciate your NFTs.
Isn't it really cool!
You need to implement the interface of the server and configure the address in config.
./run/config/metacraft/metacraft_config.json
{
"api_url": "http://127.0.0.1:8080"
}
You need to implement the following server APIs
url | method |
---|---|
/nft/list | GET |
param | type | required | comment |
---|---|---|---|
uuid | string | true | Minecraft user UUID |
collection | string | false | collection name |
name | string | false | token name |
search | string | false | fuzzy seeach collection or name |
ps | int | false | page size |
pn | int | false | page number |
{
"collections":[
{
"name": "Devs for Revolution",
"img_url": "https://lh3.googleusercontent.com/6Jbode0t_bTO9MHYoYvjIW9nHENCxOs40EGg3Z5ptg4lLlD2z2WXEAIrjyV929aQnIi94hPL4VZ3Pl2NWOO_tSaO6gdjdrcMHrF9=s120"
}
],
"nft_list": [
{
"contract_address": "0x495f947276749ce646f68ac8c248420045cb7b5e",
"token_id": "49060976528632914668253920865615404791469418896301597540949926131673459589121",
"name": "OpenSea Collection",
"symbol": "OPENSTORE",
"image_url": "https://img.seadn.io/files/284aedcaec8982d2d807412944183ca7.png?fit=max&w=600",
"permalink": "https://opensea.io/assets/0x13178ab07a88f065efe6d06089a6e6ab55ae8a15/187",
"collection": {
"name": "Devs",
"img_url": "https://lh3.googleusercontent.com/6Jbode0t_bTO9MHYoYvjIW9nHENCxOs40EGg3Z5ptg4lLlD2z2WXEAIrjyV929aQnIi94hPL4VZ3Pl2NWOO_tSaO6gdjdrcMHrF9=s120"
}
}
],
"page": {
"total": 3,
"ps": 2,
"pn": 3
}
}
param | type | comment |
---|---|---|
collections.name | string | collection name |
collections.img_url | string | collection image |
nft_list.contract_address | string | contract address |
nft_list.token_id | string | token id |
nft_list.name | string | nft name |
nft_list.symbol | string | nft symbol |
nft_list.image_url | string | token image |
nft_list.permalink | string | opensea link |
page.total | int | total num |
page.ps | int | page size |
page.pn | int | page number |
url | method |
---|---|
/nft/check | GET |
param | type | required | comment |
---|---|---|---|
uuid | string | true | Minecraft user UUID |
contract_address | string | true | contract address |
token_id | string | true | NFT token id |
{"is_owner": true}
param | type | comment |
---|---|---|
is_owner | bool | true: own false: not own |
If you have any questions, you can join our Discord server and ask for help in the support channels.