Switch that switch trans all right impromptu one today and we’ll be outside the bounds of some of the stuff that I normally work with although we did play with some of this Minecraft stuff back on the stream a while back and ultimately we are aiming for a place That kind of has a circuit python tie-in although not quite as directly as last time around uh but anyway uh to get started with the kind of grand idea right now we need to be able to have a Minecraft server running and we need to be able to have the Minecraft Client and connect and be able To uh like after we get Minecraft set up the next step is getting a mod setup so that we can run some code inside Minecraft and then like close this this so it’s not using any resources um after this we can kind of start working towards the actual goal uh which is an Idea that somebody else in the in the um the Discord had related to like kind of using Minecraft as a way to teach people about kind of some concepts with circuit python uh or some concepts with blinka depending on how you think about it uh in a way that doesn’t require Hardware kind of like replace the hardware of a circuit with um kind of a virtual circuit inside Minecraft and then you can still teach some of the fundamentals um but obviously we have a lot of stuff to do before we can even approach that I don’t even have Minecraft installed so how do you install Minecraft these days I think probably a bunch of ways uh one thing I want to do is see if I documented this before that would be pretty convenient but I don’t know know if I did I don’t know what this shows let me pull this over Here okay how do I install a Minecraft spigot server I do have this okay okay so partially we’ll go through this because I need to get spet server uh you can’t hear me anybody watching me stream right now can’t hear me in this video but this is me talking About how to set this up the last time I did it uh you can of course hear me if you go to this video but speed me up oh there’s setup in here too okay let me look that up let pull that up I didn’t Uh so it’s been a minute since I touched this thank you to pass Tim I should say hug report goes out to pass Tim for documenting this project more than he does most which is pretty helpful for current Tim no lies let’s say Minecraft okay need to get SP server need to get Minecraft client from somewhere but this doesn’t talk about the Minecraft client okay oh wait that said server good server didn’t it oh Minecraft and server Edition server bedro dedicated server oh that’s interesting I don’t know you could run a server for Bedrock is that mobile Deb file uh so you can install That with just set a capital M SL otherwise it’s will try to install from apt repository or whatever okay enough we’re not done yet uh I’m going have to log into this at some point lug in uh for those interested in more I guess traditional for this channel circuit Python directly circuit python related stuff will be around for deep dive later today then of course tomorrow uh morning I’ll be around for the normal time where I can actually whoa a lot going on there for a loading thingy but okay Minecraft Microsoft account the end of migrating from mojing Accounts to Microsoft accounts has passed uh oh I mean I logged in and got all this working like about a year ago uh if not less maybe but just not on this computer um so I think hopefully we’ll be able to so yeah it’s extra this is uh extra convoluted my Minecraft account or whatever it is at this point is extra convoluted because it actually started as not even that’s definitely not going to work I don’t think maybe this started as not even a Minecraft account moing before they were owned by Microsoft at one point made other Game and that other game was actually the first thing I got from Mojang it was the first time when I made the account and then ultimately that turned into a Minecraft account because the other game went away welcome to Xbox excuse me um think you’re lost a little bit of Minecraft we are not on an Xbox but that’s cool I guess okay wow there’s a lot going on here too since the last time I saw this uh Minecraft Java Edition start with the basics big green button nice and easy what is that that leaves on its back or Something a lot going on here like an enchanter’s room or something happened to the download was zooming along there for a minute the point I don’t know does it interrupted if I go over here tempted to start clicking around kind of impatient but it’s below this thing right but this is also Outside this thing so I don’t know Minecraft live do that mean well what is that server list what is this does this represent something that’s interesting it’s supposed to look like a server oh hey we have unclogged the uh download pipes here okay A little better We could be doing the spigot stuff in the background maybe that’s pretty cool though down with that just make sure we actually like get into a game and don’t crash and can move around and stuff and we’ll back out and try to get the spigot server set Up oh right right right okay so one thing I definitely have to do I’m going to do anything actually inside the Minecraft world is make jump be backspace not space okay seems fine can punch stuff can punch trees break into wood just as they ought to okay seems good okay that part was Easy uh h I Clos out the launcher too I guess oh wait did it yeah no okay that’s the uh the browser back there close that too so the next we need to this basically and then we’ll need to match uh our version here with server although this does say one 1222 I don’t have any idea what I would have been using back then I suppose we could watch the video build tools right right the server you have to build the server okay have a dash version I definitely have some Javas but this going to be fine for what we need I Guess we’ll find out oh that looks similar although I do have 19 instead of 11 okay has him says we need at least Java 17 we have Java 19 so that’s nice 119 one and two so it’s uh medium number jump from the last time I did this I Mean I have no idea what happened with 1.20 downloading order to get it run the latest build tools with the required arguments make sure some of this is coming back to me we do need to download we go here okay this just downloads this is so weird to Me that it’s like that this is like the place where you download it from I don’t know if there’s a different page somewhere with like a nice shiny button or something but this feels odd that it’s like a pinned message in a form and it’s like a this Link in the fourth or fifth paragraph down just kind of in here maybe somewhere else we may be just looking at a different place for it or it may just be how they want to do it right there something wrong with that either uh we got that so we can make uh Let’s make a place for it I guess let’s go Here server workspace going to do spigot server workspace first and then we’ll if we end up with multiple build builds or anything we can kind of keep inside of here it just build tools yeah I wish there would be a version in this that would be kind Of oops I totally just copied that to the wrong place okay let’s go move that one from here to here is what I actually meant interesting that makes us uh real we’re in a Java thing here uh back to past time we say here is there okay have to have git installed Luckily I use get for one or two other things Java uhoh command you need to find this page i’ actually see where pass him clicked in order to SQL light interesting I didn’t know there’s a database inside there or like a SQL light database I mean um tools Wiki yeah this is it running build tools version’s latest has him scroll to a Linux section but here we just have this kind of thing going here is there actually a Linux or do we just it got reorganized maybe it’s now the same next oh that was prerequisites maybe oh Okay okay oh here we even have oh I don’t know about that I don’t really want to do that I don’t think I mean first of all I don’t fully understand it so I definitely don’t want to do it basically I want to keep my get settings however they are though however They are now I like Auto crlf why would we need that just going to do something with it I guess P time say anything about this not actually the command it does say to do it here seems like past him skip that step which I’m inclined to do as Well and current Tim has the correct Java well not correct but has a new enough Java just linked to Java by itself so current Tim doesn’t have to worry about that weird path which is convenient should be able to just do this give it some room to breathe here Getting some uh cloning of bucket craft bucket you got to get your bucket and then attach a spigot on the side I guess probably Minecraft server that downloaded the actual Minecraft server too I guess this is how this works I really know that much about how oh wow decompiling a lot of Stuff there huh I don’t really know that much about how these servers work I guess it’s downloading the official server and then presumably we’re doing some decompiling here and then it’s going to build it back up again with its own API added onto it like computers can do stuff fast seems Like a lot of stuff very fast though I might make a coffee I think I’m going to run and make another coffee I’ll be back ouch okay I okay I apologies that took minute and to wait for the water heat up let’s see success everything competed successfully copying final jarge now Copying spigot server workplace. spigot so we got a lot of new stuff we got a spigot jar we need to do the vers we need to do the license thing or whatever there’s a file we have to edit that’s like clicking I agree essentially yeah P him is looking for the start Script we haven’t tried control F yet I mean I should have linked to it in my markdown file after I had trouble finding it did I do that that would have been correct response for install and get running running create a start script have to just make didn’t link to it Nice see we might as well hit the page because this could have changed in interim although it does look the same to me we’re making for MBR a bit um o over my head or into the weeds but I’ve been seeing this person 88 8 ADCC I believe it is this is uh This way now ADCC has been working on something that saves a little bit of space on some of the smallest devices tinkering with like kind of the lowlevel um yes configuration of the of the format of the the drive formatting storage formatting yeah and make a start script I guess Probably just in the same directory use a regular editor just touch start I don’t know if that’s actually what okay um last time I would have probably done special Java but I don’t need to let’s just say spig jar which we don’t actually have we have so we need To we need to do that either I mean we either need to do that or we need to change the file to match I rather have the start script be explicit wonder what the gooey does that’s saved exit create the jaaba virtual machine oh we didn’t fill these in these Need to have numbers like this one is 1g but these ones are hasht G we’ll read instructions a little bit not actually say it just has these what did I say in this file actually just copied them with that oh I not put that in here going to update That uh how’s going Johnny by the way if that’s if you are here and watching that’s what you were uh put in the chat there actually didn’t have the uh the Discord open for a little while but now I’ve got it um I don’t know exactly what that number Does we could go look up the flags I guess I’m inclined to just go with uh nice how’s it going Johnny hope you’re having a nice day uh let’s see think I’m inclined to just go with whatever we did last timee that’s 2 gigs of RAM for some usage But we’re getting farther this time one of these times yeah I was going to say one of these times it’s going to fail because we got to do this cing coding C++ okay let check it out what’s Johnny working on today buffer def find as Char buffer not Char buffer than nice So we save this so we should be able to run cross yeah all of it’s pretty much Greek To Me effectively circuit python is about as close to C++ as I tend to venture collapsed reparing spawn okay looks like it’s looks like it’s starting up a Server um how do we know how to find it just Local Host can you just Local Host it love all the different formatting people using C++ no best practices they agree on at all yikes yeah that definitely sounds pretty scary especially in something like C++ where I imagine there’s so many ways to Do so many things and lots of them are not necessarily safe all the time online play is offered by third party servers not owned or operated or supervised by Mojang Studios or Microsoft during online play you may be exposed to unmoderated chat messages or other types of user generated content that may not Be suitable for everyone that seems fair yeah I don’t know if it’s going to choose the default Port probably go find oh nice we could I was going to say we could probably go find the video past him to see how he joined but nice okay we’re in uh one thing we want To do over here here is go like this because didn’t work no command type help for help I say anything about this in this one basically we want to make ourselves kind of like admin H seems like that works differently then guess says well okay that doesn’t work Either not like our slash maybe do we just do it by itself maybe the slash is like implicit so maybe we just need op did I say anything about that I’m guy server operator we got a server operator which means we can do stuff like first thing we’re going to do is turn The kind of voice and speech is going on in this game craft wooden planks we’re good on that for now uh I guess it’s not in here what I’m looking for which is like uh I want to go to creative mode game mode unknown command do the Slash maybe that didn’t work I guess okay I didn’t do tab apparently you need okay so now we can fly which is also helpful nice horse and a uh you pet no oh oh we’re riding it wow I don’t even have a oh no it knocked me off okay fair Enough I don’t know how the horses go I don’t know that I ever got a horse in Minecraft okay gler this thing and then order a new recipe oh you just have to touch water to get a boat huh okay okay server’s running we’re in mod kind of like mod hello world is Next BR new project thought there used to be one in here maybe you got to install something for that generators you give more generators this part of the process I don’t think I recorded last time although once we get it ironed out I should do it this Time it might be in a it might be in a stream somewhere but that’s kind of unhelpful and I’m not positive that it’s there so it’s not necessarily worth the time to go back and try to find intellig project generators plus Minecraft spigot roughly specific a blank okay Well that’s pretty much what we want paring the project ruy get a new project have a very old Java version here it might just be an old thing though SP get plugin they’re actually just like going straight up from scratch here I could have swore there was Like could have swore I didn’t start from scratch last time be really convenient not to have to do which definitely looks convenient I mean helpful I should say I could have sworn though that get plug in but mcraft development I think that’s what we need this person is talking About installing all kinds of other stuff I where’s plugins I don’t even know how to do plugins I don’t usually do plugins in this plugins I mean one thing that’s pretty good is if you just do like double shift and type what you want you can usually get to there which works out So yeah Minecraft development 1.1 million install accept restart okay now maybe we have new project bam Minecraft although I will say in that video they had a lot of other choices right uh some of this is over here though okay plug in uhoh Fig’s not there spig different than bucket Oh as big it as within bucket but now there’s paper you know paper and sponge bucket spigot obviously you know different Minecraft servers everybody knows that just based off the name as you can tell uh we can go a different spot I think than this let’s go I mean we don’t I could put it in that server working directory that’s not really the right spot for it though we want mine here we’re going to go new project is called um Minecraft plugin hello world then this is going to create a new thing like that which is what we want plug-in bucket spigot 122 yep sure H we’ll leave all of that stuff alone um it’s already set to Maven stuff down here that I can no longer see build system properties I don’t actually get to see that there’s nothing important in there oh hey we clicked okay and now we can see it uh 17 Well wish I could actually see like there’s is there more there I mean it feels like there could be more there but it doesn’t let me um I mean it says recommended you know I don’t know what happens if we just try it group ID is that a package name This fails we’ll go back and try to figure out how to get Java 17 that was actually the exact version that past him was using so maybe there’s something magic with that one idea project files moved I don’t really know Maven projects very well anyway so exactly know what it’s talking about Or what to look for how to do anything about it um on enable startup logic so I guess like super duper hello world would be just try to like print hello world here and then go try to find it wherever it shows up I assume somewhere inside of Here during the startup of the server um we could try to find a function for like on player joint that exist like user on command so I mean one thing I was going to say is like maybe we should just jump a little bit further ahead than the most basic hello World and instead try to do a command like maybe user has a command where they can do slash whatever and then it says hello world back to them because ultimately we’ll probably want some commands that allow us to interact with the rest of our plugin which this project actually has Some I don’t know does my first plugin have copy file might be useful command check command test pin command okay so we basically here we create a command check we create a class that implements executor we Implement on command if sender is a player then player sender get their Location get Target block exact five get location wonder what this five does seems weird but okay yeah that’s good enough uh we can grab this stuff this is called command check I’m just going to make command hello world we don’t need this well we might eventually need the Serial Port someone on Twitter just told me that star space value and are the same to the compiler like I don’t know yeah Twitter skid for that sometimes B cast I don’t know how I installed this one last time so the good news I guess though is we have that Listed here is it in Palm is that how Maven Works serial looks like it we will eventually want to use this same thing where was that listed that’s in dependencies depes spig MC that one there o red not found I mean could you like try to in Like try to download it or that how this works nice thank you Maven appreciate your ability to read XML files and make stuff work and H the world okay how do we we need to like besides creating this we need to register it pretty sure they do anything maybe that’s in Here okay so some of this this is all to do with other stuff not worried about comports right now not worried about scheduling so this says incoming commands but this is talking about commands coming from the serial Port which in the case of this project here was coming from a microcontroller On play okay there is on player join I wonder why we didn’t find that do we Implement something different listener how descriptively named it event listener okay let’s try to do that first of all implements oh oh wait but this is the command and you hello world well I guess The plugin I mean the uh the underscores that’s not very typical is it right probably shouldn’t have done that probably shouldn’t have done that all right well live and learn next time we’ll create a new project and I won’t put underscores in I guess the main name main project name it seems Like it derived from that everything else um should we try to change this just leave it I’m just going to leave it for now honestly exclude what no import it yeah have on player joined event handler you need that in order for it to be able to find it Okay so this code is doing what it’s printing it’s changing it’s send experience change it’s giving the user a bit of experience it looks like it’s getting the location and printing it and then printing after event set join message welcome to feather server then it’s putting a location in It and it’s turning a block to wool and it’s doing something with the torch data some point in here we got into the redstone torch a lot of these are implemented in uh in the same file instead of in their own files I wonder if we should have done that we Have different commands here let’s try just doing something basic like this want to copy I thought there was like you had to uh like register the commands or something yeah this is inside on enable and World there we go okay so now we should have a Hello World command that uses the Command hello world executor and we should also get this message whenever we join the server if all this works but we do need to build I got to block out the sun though so I’ll be right back okay it’s time here I got Sun that comes in like Different parts of the day and then bounces off the floor right here into my eye um okay so we need to figure out how do you build but this one of these Pages actually or was it this creating Maven guide we should I should probably watch that it’s only like Minute or two long change the build location adding the dependency building the maven plugin let’s in this one actually I think that’s Fine output file last time I created a script to copy it for Me Maybe This is better though this person’s talking about I think going to be changing the output of where it’s going to build to and then uh if we could specify the server then it’s just like in the right Spot for us okay no not done yet I do this one at a time what did I have on the one was inside pal was it I don’t have that configuration just didn’t set it can we try a build how do I make a build nice uh I don’t know where it Built to which is why guess they set that before but was was this here before I don’t know resources that’s not outputs shouldn’t be tget I don’t know where that built too but maybe that built didn’t crash or like give me an error or anything so well yeah Target’s the only generated sources Class files okay so yeah I mean that’s a I mean I guess that’s a jar that’s just not Jarred not zipped put into a jar seems like I think I made a build rule I think I made a build rule last time yeah I don’t remember exactly what or how but somehow we Selected some stuff in this and that basically told it where it was building last time but let’s see what this person says if we can just configure it to go to the right spot gotcha okay let’s get our server plugins is inside of here we can’t just copy because that would be Easy to be able to just use the bar there this and then we’ll put hello world. jar oops that’s not how you copy from here in P where was that though it was configuration but it was yeah just configuration inside executions execs they have oh configurations we had create dependency Reduced pal yeah okay fair enough there’s that so we have output file P that in put that hello world. jar some people do space is that a space before and after yeah looks like multiplication yeah I would have assumed that is multiplication I don’t really uh read or WR C Plus+ Though we’re going to jump the shark a bit I guess if I just do build again does it build and like go there and exist and then no that’s weird though we didn’t get like a usually there’s like a run there’s like a like it tells you it was successful or Something this is talking about running build success lot of warnings says build success though okay hello world so I think you have to uh I don’t know how do you exit what’s the proper way to exit I mean control C is probably going to it right like shut down stop oing oh none Of these say anything stop okay I had stop and then I second guess myself does it okay it’s like are we going back to like the regular terminal or stay here takes it a minute to save um so maybe we just rerun it and then this time it should have the plugin Running o except something crashed cannot invoke plug in command set executor get command string is null command okay let’s stop so it seems like we got a build yeah you don’t say that is true I guess I should have read that before huh um why why is it not null how did we Make it not null in the this one this the code I want yeah that’s probably important huh yeah that looks important okay um IDE is none the wiser it seems still be scared that could be null let’s give it a try again okay we got a new One run the server maybe I should uh pull this terminal into the i instead of out or is it nicer to have the server outside nope we still crashed still says the same thing get command is null maybe we should try turning the command off and just doing the Join I mean does this crash the whole server nice okay so the the welcome message actually worked that part’s that’s cool so we did yeah we definitely got a successful build all that stuff is cool it’s just this doesn’t command stuff’s not working right there’s something New we did jump to Minecraft 120 there could be a change in the API or something manager register events this this implements listener did I make a new function for that one player join and man return false command string is no take out the quote so we don’t confuse Google No Such print file plugins get die Amo mans okay hypo n it’s fine don’t worry about it should have stopped the server I wonder if we can make that save go any faster maybe I can limit the world to be smaller temporarily like if I could exist in like a 100 by 100 world Or something so it just doesn’t have very much get our own little Matrix white room for testing all right uh I I wonder what what can we not how do I it would be nice if I could get it to where build success was visible without scrolling for more or less details use Maven plugin validation property with one of these values brief default verbos don’t know which one we have I guess brief would be the samean default I think I mean there is a default though I guess I guess you can’t disable it entirely in validation I don’t know anyway seems Like it was successful let’s restart I wonder if I could like I have no idea how build configurations work I wonder if there’s a way to make a build configuration that then scans this and checks for a certain line so maybe I could like check for that and If that is found then it gives you the green check basically I don’t see a crash this time so that’s probably good right I mean we definitely just saw crashes in here last time uh I don’t know there’s anything referencing our plugin there’s so much stuff I don’t really want to just oh Nice like we’re good to go okay got our join message so now can I do nice it even has tab completion o internal error have a crash now yeah there we go all right well we’re getting farther wa I wish this was like will this copy out in a better Format if I copy it out it says null right here what did I try to print whatever I printed was null and then I probably tried to immediately use it nice uh seems like I luckily rejoined as we’re getting to the action nice how’s it going tyth yep uh we are definitely Making progress yeah this is way better format okay uh what do we got here snapshot it’s I mean this must be no pointer right um get Target block exact int is null yeah location get Target block exact I mean the to be honest with you this weird Five was always kind of strange to me I don’t know what that ever did I’m not sure how to get like a docks in here there must be probably a way to do that but um okay so yeah we got null something was n and we tried to call get Location and that failed can I just print the location though this is like doing other stuff well I’ll tell you what I’ve been using cotlin not Java and I’m very used to uh not system.out not Happ to do that lock. get block. getblock data and can I just lock straight up and then Maybe like I mean the block is going to be probably empty or maybe grass I don’t know if it’s the block you’re on like standing on or if it’s the block you exist in not sure how the API Works uh let’s try get Block I mean maybe that’s just get Block it’s a block I mean if it’s should have a two string or something hopefully okay build success so like I thought maybe there was like a maybe reload I don’t know if this works I think we went down this road a little bit last time and like sometime it was Working and sometimes it was not working but yeah see and there’s a print some like scary stuff about it I don’t know we’ll see I mean what’s the worst case scenario right we stop it and restart it like we were before uh yeah uh uhoh issu command hello world okay yeah Yeah yeah yeah yeah okay location we got an object there we got a block there okay cool fluid type no fluid empty snowy actually excuse me oh no not snowy it’s false my bad okay okay we’re basically set up we’re basically set up to be where we want So so the idea here was somebody else’s idea this was Micah on Discord let me pull it up here like I was asking about this I’ll ping them if we make some progress just maybe Minecraft okay see if we can find the original idea have a strange idea if I were able to Write a Minecraft mod that allows circuit python to be emulated with blocks in game would you be allowed to get a board page for it and maintain a fork due to its unusual nature if there’s a port anyway where where it lives I’m less interested in but the idea the core Idea which I guess this one did this one spell it out too much emulated in blocks yeah the core idea here this is basically what I’m interested in this this stuck with me when Micah asked it back about a month ago and it’s been discussed a few a little bit since there Was a little bit further discussion here and obviously I had the older project with the feather which is kind of what the angle that I thought about it from this is the idea that I want to play with though I think it would be really neat To kind of be able to write blinka code specifically digital IO code is the thing that I think is like lowest hanging fruit and easiest to implement and the kind of like easiest proof of concept but so like digital iio code if you could run a python script that looks like Digital IO code but instead of interacting with a an actual physical circuit with ground and power and an LED connected or whatever right it’s instead spawning and despawning Redstone torches inside the game um so it would spawn it and it would despawn it based on the value of the Digital iio pin the the the digital inout object basically we’d make an object that has a value property in value property instead of being tied to a physical pin is going to be tied to this virtual spot in Minecraft where it’s going to spawn and despawn this Torch which is then going to make Redstone Circuits inside Minecraft turn on and off and I think that’s super neat and it’s kind of it’s in a way it’s similar to the feather thing we did back here but in a way it’s also different because Back here I had a real feather uh I had a physical device plugged into my computer and I was kind of mirroring the physical device with the virtual one whereas in this new idea there really is no physical device it’s almost like a replacement for a physical device this Is making it so you can have solely just virtual pins and you can write code that’s basically looks like blinka code and interact with those virtual pins hopefully that makes sense and then if you want you could have an actual physical device for it like this as well Which not physical but like you could have the the the the sculpture you could have the Minecraft Blocky you know microcontroller like we have here that’s optional you can do it if you want um but you could also just have the pins you can spawn them wherever you Want feel like I missed out not playing with Minecraft but it was after my time I mean I would say the same was true for me I didn’t I think Minecraft came after my time like when I was the target market for the game but I still played It a little bit because I just I mean I play a lot of like video games honestly video games are a big part of my kind of like thing to do for entertainment and relaxation and just like you know something to do that’s not work or completely mindless depending on the Game um and so like like I played Minecraft a little bit I played it on the phone first actually before I ever played on a computer I played it on a phone and then eventually it was probably even still years later that I played it on the Computer uh and then once I got to the computer and I found out that mods are written in Java I was kind of hooked a little bit further because I already knew Java so it kind of opened up a world where I can write programs that interact with Minecraft and like writing Programs that interact with different things is is pretty Central to just stuff that I find interesting so it kind of went in the rabbit hole for a little bit when I first discovered the ability to kind of like make programs that interact with it and have jumped back in A few times since them from the uh from the same angle had a quick go at blowing things up once overwhelming the IM engine FPS I saw someone do a blinky Minecraft setup nice with Arduino nice yeah I did a I did the feather with circuit python uh and then like way way Way way back in the day I played with uh a different microcontroller the esperino Pico which was a JavaScript based thing senior Dev I spend more time reading other people’s code than coding myself so the ability to read code is important to me yeah reading is definitely its own Kind of own kind of skill for sure never felt like I missed out on not having played Minecraft not your type of game yeah that’s cool too definitely cool too H thank you so much explanation story of your interest and experience yeah for sure Um see here do we want to do next so we want so I I I’ll recreate this so that we have a a name that doesn’t have underscores I’ll recreate this um where do we want to start tackling the rest of the problem from so let’s just let’s kind of let’s like Kind of sketch out the idea a little bit because I kind of have an idea in my head but it’s only in my head and like maybe if we start putting it down uh we can start either seeing problems or finding like kind of most logical places to Start from so uh the first thing I want is actually just digital IO Essentials kind of like Hello World stuff right I want basically a blanky script that’s the first thing I’m going to store it here it’s obviously not the best place to keep it ultimately but it’s fine for now Um the text in here is very small 16.25 what a random text set okay so there is going to have to be a little bit of a difference I think because one thing is we don’t have board and we don’t have pins right we’re not we don’t have a physical Device but one thing we do have in Minecraft is we need a a location a three I don’t know what they called them a vector basically like XYZ we need a a location of where the virtual pin in the game is at so we have a choice of like we either Need to have like lock equals whatever which this makes us deviate from the circuit python API which is not the best but like we’re going to have to a little bit because just we have a different reality uh another thing that crossed my mind is like maybe what if we didn’t do Board what if we had board equals addictionary and then what if we made you know I’m going to do a different pin just so it’s clear that the is actually kind of like a pin right at D6 and then what if this was a lock right and then you could still now pass Well but you can’t dot like that can you so this would have to be a class actually class board I think we’re wigging this out by trying to write python code in here want to do a plugin I guess we could give it the plugin still doesn’t really like property I don’t know if that succeeded or failed or what but it does still doesn’t seem like it understands the concept of a property which is not voting well for python Adventures okay put this in here maybe did that wrong I guess self maybe self not going to worry about the switch to Start with we’ll just do output first then we’ll worry about input after um just say led. value equals not okay so that if everything actually works how I’m imagining is you would run code like this and it would cause your virtual pin inside the game to Blink Your virtual pin inside the game would be located at this location um I do have to run to the restroom though so I’ll be back in just a minute okay you’re back hug report to my wife for this new shirt that she got me for my birthday and Uh shout out to dark knet diaries super cool podcast you are interested in uh good storytelling and uh well the darker side of the internet is what the tagline says but just like weird internet software malware Espionage all kinds of weird kinds of weird dark internet stuff but super fascinating stories and uh Really really really good Storyteller in my opinion um where’s our blink code I clicked out of this okay so this is like one way this could work I think I think this I mean we kind of the pros and cons of doing this like the board like this so This is weird I don’t know about this for sure um this is kind of nice because then this code can kind of look the same right which that’s really really convenient and then like in this world if this exists you can have this person who writes this Code or or more likely this is probably a beginner right so this person probably copies this code from a tutorial and when they then want to make the leap to actual microcontrollers if they do they would then need to come in and kind of delete this and do like import Board here which would be the real board and then the and then from there this would be gone but then the rest of this code could basically work the same missed the name of the podcast Dark Net Diaries is the podcast it’s on I mean I find it on YouTube is Where I get it usually but I think it’s on all sorts of stuff um yeah I’m I will always be happy because I think uh it’s a super fascinating show um and and by the way they have a lot of sweet shirts too if you just like uh cool computer related Shirts that’s a a lot of their shirts caught my eye as well um this is their website though darknet diaries.com I have have not listened to the latest one but I have it queued up about a lottery I think in Puerto Rico I had to slow down like when I First discovered it I was listening to them a lot and then I got to the point where it’s like if I don’t slow down I am going to have listen to all of them and then I’m going to be sad that there’s no more to listen to so I like Had to slow myself down and stop listening to them so that I have kind of a catalog that I can still pull from um which is nice still don’t I feel like I still have a lot to go through so it’s like kind of okay I do like this I it can be confusing like it gets weird because this person if they do learn about circuit python code through Minecraft they’re going to learn this concept this this constru struct of how to set stuff up this way which isn’t going to carry over at All but the good news is that the second half of it does so like while they will learn this part and they won’t use it anymore they’re basically just going to change it to this and it’s way simpler yeah and then like the other thing I guess that’s worth questioning is do we Really want to define the do we really want to define the XYZ just hardcoded in a file and I mean maybe yes I think maybe the answer is yes but we’ll see if if there’s a different way cuz it would be nice not to have to cuz this is not going to be Nice and pretty like one 23 this is going to be like you know Minecraft where we at now I don’t know how to see it Jesus it’s in here somewhere uh XYZ 30103 67.0 ne41 016 it’s on the left about halfway down I would point Mouse at it but it doesn’t work that Way um so it is kind of annoying to have to like try to copy paste that but I don’t know how El I mean I can’t really think of a way that we avoid it like the end of the day the plug-in the mod code needs to Know where to spawn and despawn on the torch that location is a one of these somehow we have to get it in there we want a command that makes it easy so like one of the nice things to be able to do is have a command that Tells you the block that the player is looking at or perhaps tells you the block that the player is standing on we can maybe print that out let’s try changing the command we have now so this prints to loc but it’s in the it’s in system.out can I print Into the chat like um how do I send a message in the chat some of my old commands do that I think so when a player joins you can do this join message but at some other times we want to do something else send message player. send message Interesting there was get Block X so let’s say play player location is oops nope not those um player do oh there is a no no no lock lock dot block X oops m I need to stop using end okay somehow you can get the place the player is looking also player Dot it Target get Target block there is yeah Um loation Target block lock Target block lock is player. get Target block this is what we had with that int I think before maybe I no idea we just had five there I have no idea what that does but that’s also getting a block which we would then want to go get Location but that was failing right this is what yeah see right here in fact this is what was failing maybe we didn’t have a Target block and the target Target block be so far away that you don’t have one let’s go one step at a time let’s try our new location printer First run that seems successful let’s try a Reload 2966 141 so it truncated but that’s fine I don’t think that matters in fact I think that’s probably good uh and that did seem to work um see spigot spigot API get Target block exact see if we can figure out what that’s supposed to Do null with material with bite yeah um I’m using a real IDE and that part’s not entirely true and also not a partly helpful thing to comment maybe like if there was a link to the docks or like any kind of more information about where to look because this just Goes to this which just says VAR one VAR 2 get this isn’t even the same function I don’t even know got to the wrong spot that’s interesting living entity okay um maybe there’s like spigot API docks okay uh player player. getet Target just because it was like living entity right living entity get Target block exact max distance oh okay so probably the reason why that crashed before is when I ran it it was null because I didn’t Target a block that was within five blocks therefore it was null just like it should be I assume so we you should catch that Right so let’s get a block is it I don’t know if it’s just block sure try it oh wait no import hey import block yes um yeah bucket block uh Target block Target block is player doget tet block we’ll just keep with five and then we can say like if it’s not Null then we do something if it is null then we just tell them that they’re that it’s too far away and then if it’s not we can try to basically do the target player Target Target is not lock but Target block. get location which is quite verbose but it’s Java you want maybe A little bit nicer so if we have a valid Target then we will print its location and if we don’t then we will print a helpful message can I run reload from in here seems like it um okay and I’m targeting one right next to me right now it’s hard to see right Now because the chat’s in front but this block right here is targeted nice yeah which is caddy corner from me by one right it’s down One X or up One X and it’s looking at that and it’s uh down up one the other way too also on Z but not y because I’m on the same level if I did this one then why would be bigger this one is caddy Corner in all three accesses nice okay cool we can get locations oh let’s test it uh let’s test it far away if we don’t have a Target because it’s too Far Target is too far away look at a closer block but it did also error we need a return we still have return oh I have this which then crashed think the player location before the Target location is probably better also and then we don’t really need to do These either if we’re printing inside the game that’s better than into the terminal there we go whoa what is that is that a pig is that a bee I don’t think I’ve ever actually seen a real be whoa yeah one of the things is uh I have not somebody mentioned earlier being Like out of the wow there’s a lot of them around here being out of the Minecraft Loop so to speak um not having played it so I did play it but it was a long time ago and I have not experienced even probably a quarter of all the stuff that’s actually in There these days in fact like I don’t legit don’t think I’ve ever seen a be in person person in Minecraft so our link is I never did actually get into sketching but our link the way that I’m imagining this working is you run python code that looks like This and internally so actually one more bit that we’ll have to change is you will need to change where this imports from we’re not going to import from digital IO but instead it will be like Minecraft digital IO something like that right you’ll import these from there and internally we’re going to have To make this class we’re going to have to make all of these in fact and this will when we set the value we’ll override the value property and it will be sending signals via seral start working on that a little bit um I’m going to call this Minecraft Virtual I don’t know we’re going to we’re going to go with that for now maybe just virtual circuit python you can always rename it from there we want a python package that is called I for now I am just going to go iio um I don’t would we want in a knit In here maybe so I’m trying to keep it enough to where we could ultimately do more than just digital IO as well potentially like uh analog maybe like a redstone I think has analog to it um resistance basically maybe we could do something like that But uh I I intend to start with just this kind of proof of concept we probably want a knit here though cuz we probably want to leave it so that the whole thing is a package for having more so then inside of here we’re going to have basically Impostors of all of these Don’t know that they actually need to do anything one thing I’m going to do is look inside a blinka because we might we want to we want to basically have the same structure we’re writing python code and it’s going to have the same structure as what’s in here I Believe it won’t have the same details is like a lot of stuff we won’t end up caring about as much like we don’t care about microcontrollers and pins in the same way okay this actually just has Direction it’s just right inside there as an enum I don’t know about drive mode I Haven’t seen that before I don’t think this we basically want to do though right yeah I I think we want this we want pull actually as well basically these can be the same these are just enum classes and then I guess we’ll go here for this I don’t know where that imported is That blinket enum or enum enum I mean which one would we want to do actually imported at all is it oh yes is this coming from blinka um we’ll just do so we I don’t we’re not actually going to use blinka directly I don’t think we want to kind of Implement roughly the sameish looking code but yeah that’s a little weird huh it defines this and it says it wants an enum but then no it says it extends an enum right and We’re unfilled so this has a class digital inout context managed actually going to start with a copy of this and we’ll be able to take some stuff out I’m going to I am going to put this in its own one over here we can delete these Direction and pull could just be Inside of a knit as long as that works for importing the same way our digital and now it’s I think it’s not going to extend anything for now it is not going to have a pin but what it is going to have is it’s going to say what it is going to Have as a location but if we are going to do this little cheaty setup thing here maybe it’s worth still calling it a pin or should we call it pin location maybe we should just keep it as pin but our pin is a different concept our pin is The the three the three tupo of location yeah I think we keep it keep underscore pin keep pin here we’re not going to create a pin we’re not going to create a pin object though let’s just set it to whatever got passed in and then by default this is actually Just set setting this to input which we can import that’s going to import weirdly I think if we just this is wanting to do like a full this doesn’t seem right does it are we not in here H that’s what I’m looking for drive mode um I I still don’t actually know what that means is it just pull I guess no that’s a direction is pull yeah Direction I know I don’t know what drive mode means output drive mode is just input output no because it has open drain there’s lots of different kinds of these things Going to go Direction input switch to Output um we want to keep that I’m just going to set this To None say Direction equals output we say value equals the new value and then we can just get rid of drive mode I think for now I don’t think it’s a thing we have In the the Minecraft concept world but if we need to we’ll add it back and set up different ones but I don’t know switch to input this one takes a pull so we set direction to input we set pull to pull yeah we can do that we’re not even Pull we’re not even really going to be using cuz we don’t have a not really going to have a the concept of pull up versus pull down that doesn’t really exist and Redstone Circuits we just have like is is powered or not basically it’s Like I mean you can make a not gate I guess so I suppose you can choose it I don’t know for now I’m going to not worry about it but we’ll keep it in so that the interface is the same dnit just says delete pin Direction get the direction direction setter If the value is output so this is saying pin and knit out we don’t need to do that value is false that’s fine I’m going to leave that drive mode we’re going to take out so we just set the direction to Output no if the if it is if the new Direction we set it here wow that’s a double underscore why is it double underscore where does this get created H that’s weird isn’t it right it’s double and I don’t think it matters but so update the actual variable storing the direction and then if it was output Set it to false if it was input set the pull To None which is fine we’re not really using pull again but we can do it I guess and then we don’t change the value this time though that’s fine raise not a Direction that’s fine value okay so when We get the value here we need to do something different um right now I’m just going to say return true but obviously eventually we’re going to have to to do put code here that asks Minecraft for the current value this pin we’re going to basically send some message via serial Over to the Minecraft mod here which is going to look up the value of the virtual pin look up whether there’s a redstone torch there or not return that to us here and then our Setter will be the opposite if we’re in output and we set the new value we want to basically Update and in my imagination this is happening via the serial basically so code here will uh somewhere in here probably inside of a knit in here will open a serial connection um although we want to have we we want to ah we may have to pass the serial connection in so then we Would end up altering the API more but because we want to have multiple pins we don’t want the PIN to own the connection I don’t think unless we can have multiple Connections in which case that’s fine but yeah if each pin like we’ll want to be able to make Multiple pins so we may need multiple connections or else we’re going to have to have one connection we have to pass it into the pin and then use that connection rather than creating new ones so the pull Setter we’re basically not we don’t have to worry about any of this Honestly we’re just going to we’re just going to set it to this that’s fine and then basically I think everything else is like pass here h i don’t yeah I don’t think any of this matters honestly let’s just get rid of all of this not doing pull right now Anyway let’s just delete all this not a pull there none else this is doing oh okay I guess we maybe we want else I suppose I don’t know don’t think any of this actually matters p is none so we will say if you give it an invalid thing we’ll tell you it’s Invalid I suppose that way at least we’re throwing the same exceptions it is weird there’s we got another one one of these where we it’s pull Define yeah see it’s not defined maybe we didn’t did I delete too much or that’s not actually set those up in There I don’t know maybe because it’s in here that’s probably it that’s probably it should probably put them in a knit for us cuz we don’t have contacts managed maybe that’s part of the key for our serial connection though maybe we should be extending a class that gives us access to the serial Connection just going to pass there keep that in but so let me try to get the serial listener inside of Minecraft I to get that set up in this one probably about time to start looking in the real one we have my first plugin and then we have the one that I created After do this stuff though okay but this is different because this is trying to find TTY ACM Z so one thing is like what we’re trying to do is kind of fundamentally different in the we don’t have a device on the other end particularly when the Server gets created maybe we would want a command for creating opening the connection basically yeah see this one actually got commented out here have scheduler run so this allowed it to run every tick or whatever every so often Port is null yeah see here we don’t have the setup anymore that H that was so wrong will be messed up if we open that one CU it’s like Parent Directory yeah see we got rid of this here we’re no longer yeah we had start feather it’s down here and that’s where it’s opening the port but we have a bit of a chicken and egg Problem in a way like one side or the other needs to be the one to like kind of initiate or start the connection or be the server or whatever I don’t know if it’s actually a server client or if it’s just just peers or whatever but the thing is in the old Version of this in the feather version of this the serial Port is already open and waiting for us our plug-in code we just connect to it but that is not the case anymore cuz we’re not and and the reason why that exists in the feather case is because the feather was plugged In the feather does that for us but we don’t have that feather anymore we’re not communicating with a real physical one so we either need the python code you either need to have already run this code maybe before you run the command inside the game and then if you do that then maybe This code can spawn the connection can initialize the connection to make it so that one of these things is available one of these ports are now open and listening and the python code is on one side of it and then you know nothing has joined to The other side yet but then we run the command in the game and now the code inside the game connects on the other side now they’re ready to start talking to each other or like that’s one option is python code initiates that port or that Channel or whatever it is the other Option is the Java code inside the plugin initiates the that Port Channel or whatever it is the difficulty though is I don’t actually know how to do that at all because with the physical device it just works right you just plug it in and circuit python does this for you so it’s Like how’s it going uh Casper gudam over on the twitch there my friend thanks for hanging out I suppose you know how to open a Serial port in python or Java by chance to you Imports so that’s the thing though a lot of this code like we’re going to Find this code that’s like how to open a port from python but it’s going to be like the same thing we had right it’s going to be like declare TTY ACM whatever and then open it and then talk to it but that’s not what we want we Want to know how to like kind of like host that so that other stuff can then open it P serial tools list ports audit Imports I don’t know every we don’t want to be using a Serial Port does serial Port impli Hardware what if we said like python create virtual serial port I work on windowsos module it’s very old actually though getting the sense maybe seral Port is not the right way to go potentially H interesting yeah I’m feeling like serial is probably not correct already so this could potentially work if we use this thing maybe seral emulator which it looks like is Basically doing the same thing as this which would but also it looks like it would work based on what’s here I mean it’s several years old so who knows maybe the command could have changed or something slightly I don’t know that much about soat but the little bit I know makes me Think it could probably do this and seems easy enough on what the command’s doing kind of echoing back but I don’t think this is what we want probably um I got to run to the restroom again though so I’ll be back in a minute okay had a thought over it I think maybe We don’t want really a we don’t really want a serial connection but we could maybe just use a socket server Java socket server example there slightly higher level don’t necessarily want to like write my own higher server stack it’s not really an HTTP server that I’m After I mean this would maybe work but I would love a slightly higher level thing where I can then maybe not have to do quite as much so I think that it makes the most sense for the plugin to run the server so what I’m thinking now like throw out the idea Of Serial cuz that’s I it seems like tied to Hardware which we’re not we could emulate it but it’s going to be awkward I think no matter what and ultimately if we get away from it I think it’s going to be better so instead of Hardware serial or emulated or Whatever we can use a socket server where and and as far as who starts it who initiates it I think it makes the most sense for the plugin to initiate it because that way when the server when the Minecraft server spawns it can spawn the socket server as well inside the Plugin that way then you’re ready to just run this script which will connect to the socket server and be sending messages back and forth with it to make stuff happen and so it makes way more sense for this code to not initiate it it makes way More sense for the plugin to initiate it that way the server running is kind of the first thing that happens which is already the first thing that happens so that makes way more sense so we just need to get a we need to spawn a new server inside in here but I don’t know if this is um blocking this is probably blocking honestly like we’re going to call server. start start and it is never going to return we had a print statement after this we would never see it that’s my hypothesis is not really what we want Because we need that code to continue we need a we need a we want a socket server that’s going to be in the background we want a threaded socket server really what I want is like a Java socket server Library NTI or Mina so netti I’ve seen before Preston is the author of Both and says use netti five is abandoned but four is the recommended version discard server to implement the discard protocol the only thing you need to do is ignore all data received it’s pretty sweet I’m down with that yeah this I think is going to be better cuz these look Like these look like we’re getting callbacks getting callbacks whenever a message comes in and not just but we don’t have main or like start though wow I don’t know bind Start unless there’s like run async or something honestly we might be having the same problem problem okay let’s try netti server nonblocking example to netti oo that’s very convenient wrong ID wait no where’s the wait no this is the wrong did I do this window I guess I did I think I did with this window actually didn’t to it’s not happy with this vulnerable safe version is 4186 that’s fair let’s do that make sure the heads up don’t want to be running no insecure servers inside of here that is a bit weird I don’t know Guess I don’t know how Affiliated this site is with netti playing decoder down Handler I mean it’s unclear to me whether it’s blocking or not I guess I mean I guess it must be cuz it doesn’t just finish it’s creating client Handler how is this let’s see currently minus one okay That’s a good start okay well so the question yeah supposedly this is is a code though I don’t really I don’t want to use HTTP if I don’t have to but I guess we could I don’t really want to though rather just have like socket connection basically like streaming strings back and forth Basically really want I mean I guess no we don’t we don’t want an HTTP server because we want the server to be able to we want the server to be able to initiate messages because so like in this example we’re sending data into the server always we’re setting the value of the PIN to the opposite so we’re basic basically going to be telling the server to spawn or despawn the torch we’re always sending data in with this one but as soon as we want to do Direction input we need the server to send us updates which also gets at a weird Part we’re going to have to have like going to have to have like some background thread listening for those somehow Let’s cross that bridge when we get to it but I want to figure out the first part of it even before CU we need to need to start building the bridge if We ever hope to build the second half of it and eventually cross it um yeah I was hoping for just a socket server just a regular socket server Nova socket server nonblocking example blocking sockets the synchronous server Neo we saw Neo somewhere else this looks pretty promising Yeah is NE is that a library Neo socket do we need a different thing we should go back and delete netti I don’t think I’m actually going to use netti I think this is HTTP server I don’t really want to do HTTP layer blocking Echo server Okay that creates a and it’s using it is Neo does this have a palm or is this Gradle or is it something entirely different new and exciting rle or anything need to figure out how do you include Neo ni iio Neo socket I guess should we be aiming for neo2 Only has socket server there’s no asynchronous does it is asynchronous though we can tell because of this stuff here doesn’t have a two here anyway so it looks like the same Library we could try to diff it I guess but got start with this one so we need Java and maybe it’s not a library though java. Neo does that just exist maybe this stuff just EX exists if we took this server is this one an echo server yeah so it would be nice to have this in its own thing I think I don’t know if we’ll be able to What was that oh that was something in here I guess have no idea what but it sounded weird seems like actually this stuff does import so Neo I guess that’s part of java then that one’s red but we still have some things here maybe some more of this Fixed cool okay so we have Echo server hello I’m an e server have a conversation and then it goes into a while through basically to read it looks like and whenever a message comes in it’s going to send back the same message and it’s going to try to run on Port 5000 cool sounds good so let’s try and here in the plugin in the on enable let’s put the code that’s here we don’t need the sleep we just so it’s actually just created that’s nice uh maybe we want to have I don’t know a variable do we want to maybe uh go server Server serial server really serial anymore is it socket server let’s call it don’t create it yet we create it in here socket server equals new Echo server uh and theoretically that’s just running that’s what it looks like from this code they have a sleep to basically Wait for 60 seconds and then stop so that it ends eventually but ours is just going to run as long as Minecraft is running um there’s no server. stop or anything so I guess there’s no cleanup hopefully that you’re supposed to do theoretically fingers crossed um if that’s going to work then I guess it’s going to work like that so let’s do this build success uh this one’s probably on the dice or side of the reload but I mean harm and trying I guess uh is it reload complete we didn’t add any other prints or anything So only way to know really would be to try to connect to Port 5000 so can we get some like python socket connect example I know what happened here but a lot of this is not python white space I mean delete it then I I told you to format It alt shift L that’s too many things on I don’t even know if I can press all those things I mean I already did that I think right it’s not going to fix it not going to go through and fix all of them so maybe I am don’t I really would Prefer not so many yellows feels pretty silly though okay that’s going to connect our Port we know is 5000 it’s going to be that’s not that’s not what we want you know what this is the python version of the same code basically this is like making the server but that’s not What we want we actually want to connect to the running server so I’m going to do this pocket binded put it into listening while true but that yeah no that we don’t want to do actually though right this is not yeah see this is server it’s client yeah you want client oh My you want CL we’re connecting to Port 5000 we’re not connecting to Google we’re connecting to Local Host just hopefully running from the Java code inside there on Port 5000 connect and it says error or it says is connected where’s the one that sent a message I thought one sent a Message receive from the server close the connection does our server send immediately when you join now so it says oh it does actually yeah yeah yeah yeah yeah okay um so we want to receive I don’t know how many bytes we’ll just try that I guess and see what It does um yeah let’s do that so we connect successfully connect we receive we print whatever we received and then we want to send and then we can close after that I think well maybe we should receive again because it’s an echo server and it’s Going to send it back to us if it works so we receive again and then we close after that okay fingers crossed oh okay halfway halfway is pretty good we got the Hello message so our server is definitely running inside of uh inside of our plug-in I mean probably right I guess Something else could have caused it to do that but probably not our I think our server is definitely running in there we connected to it we got our first message but then I did something oh you can’t do right it needs to be bytes I guess if we just do um wa I don’t know if we do that is it btes now I don’t know how that works exactly so did we crash the server in there nice no we did not and it still works we sent it we got our message back so we can send and receive from our python code to the Server that is inside of our Minecraft plugin awesome aome um I might be taking a break there I think actually I think it’s about time for uh coffee if my wife is interested in Coffee Day time we’ll see I’m definitely interested in getting up and moving around for a Bit and this feels like a pretty good stopping point because we got a lot accomplished we got Minecraft running we got the server spigot server running we got our plug-in built inside of our plug we got an echo server and we’re connected to our Echo server from the python code and so Now what we’ll do eventually is I wonder if we can have multiple clients is there an easy way for me to like run this twice really fast like two threads at once I don’t know I don’t know if it matters I mean it might matter it does matter because it will depend on How it will depend the answer to where we create this connection depends on the answer to that if we’re allowed to run this twice at the same time then the place we create the connection can be inside of The Constructor for this inside of here we can create like self. socket Whatever and it can be this connection and then each digital in-out object you create has its own connection inside there but if we are not allowed to run two or more you know n of these at once if we’re not allowed to have more of these than one then we need to Change it to where we open this connection somewhere else maybe inside of this fake board maybe board exists as a class and then board could hold that connection for us and so when we get and and there could be only one if that works I don’t Know if that works actually though but I mean we’re only interested in supporting so the thing is I’m not interested I’m saying run this one twice at the same time but the truth is I’m not necessarily interested in supporting that part of it I’m okay if we don’t Ultimately support running two of these code things at the same time what I definitely do want to support though is multiple pins right right here we’re setting up only one pin but for sure I want to be able to do you know whatever right we want to be able to have multiple Pins and that’s where it determines if we open our connection inside this Constructor that means we’re opening multiple connections which is probably the simplest way that the code could work but I’m not sure it’s going to let us do it and if it doesn’t then I actually do kind of like this thread Of this board object that we’re already creating here this could actually open the connection for us in the background and then whenever we are setting value here so like our digital in out here is already getting board. this inside of here we could be you know saving off a Reference to board. socket connection or whatever and then inside a value we could say self. socket connection send I kind of like that actually I think I do actually kind of like that and so then do we end up creating board as a thing out here maybe but then somewhere Somewhere you will still need to do this right because remember this is a location inside Minecraft but somewhere the user still needs to be able to do that but maybe what we end up with is maybe we end up with a function can you have Dynamic properties I don’t know if it works like that maybe there would be like board. register pin or something right this doesn’t exist in circuit python but maybe we could have something like that exist and then that would register it for you which would then make this be valid which is what we Want and then Bor if it also held that socket connection inside of it yeah I think I like that idea of board being the thing that holds that especially if it can’t just go inside of here I think it’s worth trying if it can go in here I think that’s probably still The least complex CU we don’t need to bother with like opening the connection once and passing it around to everything that wants to use it but if it doesn’t work which I’m kind of suspecting it won’t if it doesn’t then this is our next option which I do Kind of like so it’s nice to have a good plan B that’s something that actually sounds good okay I think we’re going to call it quits for now on this though um I will be back for the Deep dive this afternoon that’s at 4: well it’s at 400 p.m. my Time which is Central it’s 4 hours from now um but we will be of course over on the Adafruit channel for that we will not be working on this this is not really directly circuit python this is kind of like uh project I want to just Work on um so we won’t be doing that for deep dive I got something else in mind um but I will be back if you want to see some circuit python stuff then I would encourage you to come hang out then I’ll be back tomorrow morning and tomorrow Morning I might actually work on this we’ll see I’m I’m not going to commit to it 100% um right now but um I’m kind of excited about this so even though it’s not circuit python directly uh in the morning on my own stream I may pick up Back on this but um we’ll see that’s what I got for now thanks for hanging out folks hope you all have a nice day uh if you do happen to come back for deep dive then I’ll see you later on then uh otherwise I’ll see you later and uh thanks again for hanging Out Video Information
This video, titled ‘Minecraft Mod Dev – Trying to Get Set Up’, was uploaded by foamyguy on 2023-11-10 18:10:03. It has garnered 58 views and 3 likes. The duration of the video is 02:53:57 or 10437 seconds.
Powered by Restream https://restream.io
I’m working on a game for CircuitPython day (and a bit afterward). Watch along as I work on a CircuitPython implementation of the Atari Lynx and Windows 3.1 era classic Chip’s Challenge.
If anyone else is working on CircuitPython games please share! I’d love to play or check out any made by anyone in the community!