• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Naohiro2g/minecraft_remote: Remote control over Minecraft Java Edition in Python ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Naohiro2g/minecraft_remote

开源软件地址(OpenSource Url):

https://github.com/Naohiro2g/minecraft_remote

开源编程语言(OpenSource Language):

Python 100.0%

开源软件介绍(OpenSource Introduction):

Naohiro2g/minecraft_remote

(==== 日本語はこちら。 ====)

1.12 World of Color Update 1.13 Update Aquatic 1.16 Nether update

We had been stucked in the world of color for four years. The wait is over. You can control over Minecraft Java Edition Version 1.16.5 in Scratch 3 or Python.

Remote control over Minecraft in Python / Scratch

By using the Minecraft API and coding in Scratch or Python, you can place blocks and move Steve around, and more.

As you know, it is of course fun to do such things manually in the Minecraft world, but it is also fun to code and automatically remote control. And it's an excellent subject to get you interested in learning Scratch or Python.

In my class, we even include the use of git and GitHub.com, which is a fun self-study material for both young learners and experienced ones. It's a great way to learn a programming language by having something you want to do first.

I believe the same is true for learning a foreign language. Don't learn the language, use the language. (I've just created the 'quote' now. ;) )

Editions / versions and environments

There are three different environments depending on the combination of Minecraft editions and versions.

Regarding Python modules, the Java version 1.12.2 uses the traditional mcpi as in the Raspi version, while the Java version 1.16.5 uses the new mcje. The Java version 1.16.5 uses the new mcje. The RasPi version does not require any mods, while each of the two Java versions requires the same version of mods as Minecradt, and a Forge to house the mods.

Minecraft Forge mod Python module Scratch + Extension
Pi Edition (MCPI) Raspbery Pi - - mcpi Scratch 1.4 + Scratch2MCPI
Java Edition (MCJE) 1.12.2 Forge 1.12.2 RemoteControllerMod-1.12.2 v0.02 mcpi Scratch 3 + MC Ext 1.12.2
Java Edition (MCJE) 1.16.5 Forge 1.16.5 RemoteControllerMod-1.16.5 v0.05 mcje Scratch 3 + MC Ext 1.16.5

Optifine mod might fine tune on the visual effects of Minecraft Java Edition to make it snappier.You need to select the same version as Minecraft. https://optifine.net/downloads You might need Java SE 8 JRE to run Forge. https://www.java.com/download/

You can run Minecraft Java Edition on Linux including Raspberry Pi, Mac and PC. Unfortunately, at least so far, new comer who cannnot have Mojang account are very difficult to launch the Java Edition app on Raspberry Pi. (Minecraft account system is in the middle of migrating from Mojang account to Microsoft one. Arm platform is not on the support list of Microsoft.)

The changes of Minecraft Java Edition at 1.13 "Update Aquatic" were so significant that we were forced to stay with 1.12.2 for three long years in remote control over Minecraft. We broke thruough it by the huge effort of takecx, then made it possible to work with version 1.16.5.

But, once again, the changes at version 1.17 was pretty large. For the compatibility with the latest version of Minecraft-Forge 1.17, please wait for a while to cope with it. Or, rather concider to join force with us for the development of RemoteControllerMod on GitHub.com to reduce the wait.

(The black horse is thinking... to help us?)

Examples to draw something in the Minecraft world by voxels or volume pixels

Sorry, examples are only in Python, not for Scratch, so far. See takecy's to start in Scratch.

  • hello_MCPI.py, hello_MCJE.py, hello_MCJE1122.py : Typical Hello World code. Try this first to learn how to select Python module mcpi or mcje for your environment. Install mcpi from Pypi with this. pip3 install mcpi --user or pip install mcpi --user

  • digitalclock.py to display a realtime clock with time and date using 5 x 7, LCD font in the format as follows (also shown in the picture above):

        2021-06-26
         21:28:45

Using hand-made LCD font on double-buffer display, you can learn 'class'. I prefer SEA_LANTERN_BLOCK for the time display but unfortunately it's not available in MCPI.

  • axis_flat.py : Module to draw x, y, and z-axis and to flatten the world in addition. Nice and useful utilities to prepare the world for learning. Axes with the virtual origin at (0, 80, 0) for MCJE, or (0, 20, 0) for MCPI using block types as follows:

    • x-axis: Stone blocks
    • y-axis: Grass on soil blocks
    • z-axis: Gold blocks
  • demo1.py, demo2.py : Usage of axis_flat or double_buffer_display modules.

  • (NEW) maze.py : Building a maze in the Minecraft world by supu, Python VTuber. Watch her movie on YouTube : https://www.youtube.com/watch?v=iK3V8q2EiI8 "Remote Minecraft by Python" — Let's create a maze automatically and play with it on Minecraft. — In Japanese without English CC, sorry.

    • Using a Python module named mazelib. It contains C++ code and there is no binary on Pypi, it needs to be built during installation with pip.
    • Mac, Linux:
      • You should be successfully install it with sudo pip3 install mazelib
    • Windows 10/11:
      • If you have C++ build tools, this will help you: pip install mazelib Or read the details below.

You might think learning axes or axis are too difficult and too early for age 8, but it's not true. If you are thinking to teach them, it's true. Just try to assist kids learning. Umm, I'm just playing with them, actually.

(Maze by letters, and by blocks in the Minecraft world.)

Widows C++ build tools (for mazelib)

https://visualstudio.microsoft.com/downloads/

Open the "Tools for Visual Studio 2022" in the page, then get the "Build Tools for Visual Studio 2022". The app/tool is stand-alone so you don't need the Visual Studio 2022 itself.

Launch the app and you will know the name is Visual Studio Installer. Click the "Modify" then, find and install two components below in the "Individual components" tab.

  1. Windows 10 SDK or Windows 11 SDK
  2. MSVC v143 VS2022 C++ x64/x86 build tool (latest)

Search windows sdk for (1), search msvc for (2).

Files used in the digital clock

digitalclock.py

  • Main file to run by python digitalclock.py
  • Using two display instances, for date and time, respectively.
  • You need to select a python module from mcpi or mcje to use.

double_buffer_display.py

  • Class BufferDisplay
  • Display class with two flipping buffers to draw only changes from the last time.
  • You need to select a python module from mcpi or mcje to use.

font_5x7.py

  • 5 x 7 LCD font design

param_MCJE.py, param_MCJE1122.py, param_MCPI.py

  • Constant values of several block types, world size, and axis parameters
  • param_MCJE: for Minecraft Java Edition 1.16.5
  • param_MCJE1122: for Minecraft Java Edition 1.12.2
  • param_MCPI: for Minecraft Pi Edition

mcje (minecraft java edition)

  • Python module forked from https://github.com/lasteamlab/mcpi2
  • Named as mcje, and updated for use of Minecraft Java Edition 1.13 or later.
  • It might be available in Pypi later.

Preparation for Python, Java and other environment

(in the pipeline...)

  • Python 3.7.9
  • Java SE 8 JRE



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap