kbsriram / mcpiapi Goto Github PK
View Code? Open in Web Editor NEWMinecraft Forge plugin to replicate the Minecraft Pi API
License: Other
Minecraft Forge plugin to replicate the Minecraft Pi API
License: Other
Here's a dilemma for your and my mods. Do we translate between Minecraft PI block IDs and Minecraft Desktop block IDs or not? The differences are occasional but real. See:
http://www.minecraftinfo.com/idlist.htm
http://minecraft.gamepedia.com/Data_values_%28Pocket_Edition%29
For instance, podzol is very differently implemented: a separate block in PE and a subtype of dirt in Desktop.
When I started writing my mod, I started by translating, though I didn't take the translation to the level of the meta values. On the other hand, Raspberry Juice doesn't translate. Since our API is anyway more similar to Raspberry Juice than to PI (neither of us has implemented camera controls, for instance), it makes sense to be more like Juice by default, I think. What do you think?
Happily raised this error today when first trying the mod out by typping "/python test"
[Client thread/INFO]: [CHAT] Could not start python: Cannot run program "python" (in directory "[…]\minecraft\mcpimods\python"): CreateProcess error=2, The system cannot find the file specified
I guessed it was because I didn't have Python added to the PATH. So I typed "setx PATH C:\Python34" in a terminal.
I haven't rebooted Minecraft yet but I'll update this issue as soon as I can to tell you if it fixed the issue. Hoping this will fix it but some newbies might not understand the error and know what to do to fix it, so there ya go.
This is based on the code rather than actually trying your mod, but it doesn't look to me like you search the system path for the python executable. On my Windows system, ProcessBuilder when given a list of arguments (as your code looks to me to do) just directly executes the binary, without invoking a shell or searching the path, and so you can expect it to fail unless python.exe is in the current directory.
In my Raspberry Jam Mod, to which I just added a python command inspired by yours, I search for the script processor in ScriptExternalCommand.getScriptProcessorPath():
https://github.com/arpruss/raspberryjammod/blob/master/src/main/java/mobi/omegacentauri/raspberryjammod/ScriptExternalCommand.java
This project seems to be dead. There weren't any commits in 5 years, and last supported Minecraft version seems to be 1.7.10, which is very old.
Are there any plans to resume development? What would need to be done to support Minecraft 1.15 and 1.16?
Hi! Is there anyway to stop or kill a process that is running inside a "while(TRUE)" loop? Thanks!!
Via @arpruss
https://groups.google.com/d/msg/adventures-in-minecraft-forum/chq0v6Ka1zA/9UpH_VanFAAJ
Another thing is that it looks to me (I could be wrong) like your implementation of events.block.hits() returns all block hits, while according to the API as documented on stuffaboutcode and according to the Raspberry Juice source code, only sword hits should count.
I've added an events.setting(restrict_to_sword,x) option, default true, to control this, when it's true I check for sword wielding using:
private boolean holdingSword() {
ItemStack item = Minecraft.getMinecraft().thePlayer.getHeldItem();
if (item != null) {
String name = item.getUnlocalizedName();
if (name != null)
return name.contains("item.sword");
}
return false;
}
Is there any way to contribute bits of python that do things? Or is that something you leave to the rasberryjam mod git end of things?
(Thanks for the work! Awesome tool to get kids in to coding, and awesome tool to amuse "older kids" with as well.)
I think it would be nice if the output from /python scripts were shown in the chat.
In my raspberry jam mod, I put stdout directly into chat (as a ChatComponentText) and I put stderr into chat with a prefixed "[ERR]".
Hello,
I coded up a getBlocks command for the WorldCommandHalndler - can I email it to you, or commit it here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.