the-lodestone-project / Lodestone

Create Minecraft bots with a powerful, stable, and high level Python API.
https://lodestone-documentation.vercel.app/
MIT License
42 stars 2 forks source link

Mapart plugin #26

Open bstar16 opened 10 months ago

bstar16 commented 10 months ago

just curious if this bot would be capable of making mapart if someone coded such thing, would be survival obviously and fully afk if also possible

SilkePilon commented 10 months ago

i think this can be done.

you can even use a lib to convert an image to minecraft blocks (there are also websites that can do this) and make the bot build it

SilkePilon commented 10 months ago

if you want you can make a plugin for it (if you decide to code it) so everyone can use it

SilkePilon commented 10 months ago

https://minecraftart.netlify.app/ < maybe

bstar16 commented 10 months ago

https://rebane2001.com/mapartcraft/ this website turns images into schematics and is very customizable

SilkePilon commented 10 months ago

https://github.com/PrismarineJS/mineflayer-builder/ can work

its in js but does also work in python. you also need to change the createbot part to use lodestone

bstar16 commented 10 months ago

the main issue i see is getting bot to collect more resources when it runs out - how will it know where to get them from? will it be able to know which shulkers to use if the user is making a larger mapart? etc etc. On servers that allowing duping like anarchy servers this bot would thrive their, keep in mind tho carpet duping still works on most servers even if it isnt anarchy and such thing is allowed. I'm mentioning carpet duping since the website listed above supports making maparts in this way, it just adds placeholder blocks under the carpet, you can also use frost walker but i dont think that would be easy to code.

SilkePilon commented 10 months ago

You will need to add your own code for getting blocks. I don't know if that plugins support survival

bstar16 commented 10 months ago

https://github.com/PrismarineJS/mineflayer-builder/ can work

its in js but does also work in python. you also need to change the createbot part to use lodestone

im not sure how useable this actually is for the reasons mentioned above. the main goal is to be able to automate the process in survival which would be great. dont get me wrong i love spending hours placing all these blocks with printer and then seeing my creation, however would be nice to be able to go afk and do other things.

SilkePilon commented 10 months ago

Well mineflayer has a plugin to load those blueprints. You can write your own code based on that data

bstar16 commented 10 months ago

yeah i dont have the skills to code such thing unfortunately, hopefully someone else does tho would be sick to have a bot for this.

bstar16 commented 10 months ago

would probably be easier as a mod but it would be nice to make maparts from a web panel

SilkePilon commented 10 months ago

I can maybe make it as a plugin but it's gonna take some time

bstar16 commented 10 months ago

that would be great, honestly would consider compensating you for your time if you're serious about it. Mapart is probably the only thing that is stopping me from not playing the game just think its amazing you can create almost anything even tho its just pixels

SilkePilon commented 10 months ago

Going to work on a plugin for this.

SilkePilon commented 10 months ago

Good news @bstar16 i almost got it fully working!

SilkePilon commented 10 months ago

@bstar16 i just implemented it after some hours of coding!

import lodestone
from lodestone import plugins

mcbot = lodestone.createBot(
  host='localhost',
  port=44103,
  username='Bot',
  auth='offline',
  ls_plugin_list=[plugins.schematic]
)
input('press enter... ')

mcbot.emit('build_schematic', '../examples/schematics/smallhouse.schem')
bstar16 commented 10 months ago

wow that's great! how did you implement it does the bot begin to build the map after you set the coordinates of where it needs to be placed and how does it get the resources for the map. quite amazed you did this, good job

bstar16 commented 10 months ago

also how does it take the schematics, would love a full walkthrough of what it's capable of so far

SilkePilon commented 10 months ago

Well atm i fully converted the JavaScript (old code) to python. Atm it does not work in survival. Although this is really easy to implement. Tho it cant get the items itself. It needs to be in the inventory. (For creative it gets it from the creative menu). In the examples folder there are some great examples including an map art of the lodestone logo. I have still a lot of bugs to work out bur im planning on doing that today.

SilkePilon commented 10 months ago

The code (for now) only supports .schem and .nbt files but .schmatics can be converted to .nbt online

SilkePilon commented 10 months ago

You can try it out on a supperflat world

SilkePilon commented 9 months ago

@bstar16 I'm working on a update for the plugin. Fixed most bugs and added a progress bar.

bstar16 commented 9 months ago

interesting but i'd much rather prefer something that works for survival as that's the main goal, i know mapart bots work for creative but that's not very helpful but i do appreciate what you've done so far

SilkePilon commented 9 months ago

So for survival mode what does the bot need to do to obtain the blocks?

also maybe join the discord server. Its a bit easier to chat there

ChuanWu930 commented 7 months ago

Please God, I need this robot that can automatically build map art. Although writing programs is a bit difficult for me, I should be able to give you some inspiration.

ChuanWu930 commented 7 months ago

I hope these robots can get materials from the box. If my blueprint materials are limited, the robots can only take the corresponding materials. The robots can communicate with each other to detect whether there are any missing materials, or there can be an interface that can directly place your materials. nbt file for the robot to detect and build

ChuanWu930 commented 7 months ago

I'm very sorry I can only provide my thoughts, I hope it helps you