RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    MCPI and MCPI-reborn

    Scheduled Pinned Locked Moved Help and Support
    mcpi
    19 Posts 3 Posters 1.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bulleribokk @mitu
      last edited by

      @mitu well I suppose the old minecraft-pi fits that description, so I tried to change my script to

      #!/usr/bin/env bash
      rp_module_id="mcpi"
      rp_module_desc="mcpi-reborn"
      rp_module_licence="PROP"
      rp_module_section="exp"
      rp_module_flags="!all videocore"
      
      function depends_mcpi() {
          getDepends xorg matchbox-window-manager
      }
      
      function install_bin_mcpi() {
          [[ -f "$md_inst/minecraft-pi" ]] && rm -rf "$md_inst/"*
          aptInstall minecraft-pi
      }
      
      function remove_mcpi() {
          aptRemove minecraft-pi
      
      
      function configure_mcpi() {
          addPort "$md_id" "mcpi" "mcpi" "XINIT-WM:/home/pi/mcpi.AppImage"
      }
      

      So this time when I ran it, it seemed to execute the function install_bin_mcpi() at least, made me guess that this is actually executed by the retropie setup script which just parse this file and get code to run from prefix instal_bin_* is this right?

      Seems it did not run the function configure_mcpi() so I did not get an mcpi item to click on in ports :\

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @bulleribokk
        last edited by

        @bulleribokk said in MCPI and MCPI-reborn:

        Seems it did not run the function configure_mcpi() so I did not get an mcpi item to click on in ports :\

        Then run it manually

        cd $HOME/RetroPie-Setup
        sudo ./retropie_packages.sh mcpi configure
        
        B 1 Reply Last reply Reply Quote 0
        • B
          bulleribokk @mitu
          last edited by bulleribokk

          @mitu I found that I was missing a bracket } and that's why my script didn't work, and you were absolutely correct that it had to be added with the line sudo ./retropie_packages.sh mcpi configure, no reason to actually install anything, just the configure line :) I guess if the functions above are needed then no problem.

          Anyway.. The result was amazing! It has been some time since I tried to run mcpi-reborn on rpi3 with full desktop, it was just too jerky to enjoy, but this way was quite smooth actually :) Loaded up a new world now, could see little baby pigs running around there with smooth movements, and not very noticeable lag when moving the mouse around to look or when walking :) Thank you so much for the help! :D

          This was clumsy and slow for me to make work, but with your help mitu, it is definitely solved! Now others can also enjoy mcpi-reborn on retropie even on the slow rpi3 unit!

          There's AppImage for whatever target architecture you need for your retropie on the github page for mcpi-reborn, so just grab the right one and save in homedir or where you want.
          Here's the (repaired) script if others need it, put it in $HOME/RetroPie-Setup/scriptmodules/ports in your system and just make sure you've got the game AppImage file location and path correct at the bottom of the script before running:

          #!/usr/bin/env bash
          rp_module_id="mcpi"
          rp_module_desc="mcpi-reborn"
          rp_module_licence="PROP"
          rp_module_section="exp"
          rp_module_flags="!all videocore"
           
          function depends_mcpi() {
              getDepends xorg matchbox-window-manager
          }
           
          function install_bin_mcpi() {
              [[ -f "$md_inst/minecraft-pi" ]] && rm -rf "$md_inst/"*
              aptInstall minecraft-pi
          }
           
          function remove_mcpi() {
              aptRemove minecraft-pi
          }
           
          function configure_mcpi() {
              addPort "$md_id" "mcpi" "mcpi" "XINIT-WMC:/home/pi/mcpi.AppImage"
          }
          

          Then run the configure function manually like so:

          cd $HOME/RetroPie-Setup
          sudo ./retropie_packages.sh mcpi configure
          

          This I did over SSH ofc, so after having run this script, on the retropie you need to restart emulationstation, and "mcpi" will be added in ports :)

          The game has a few GTK zenity dialogue boxes that pop up first and gave me no mouse pointer so I had to use tab for moving about and get past those, it was annoying, but fine. I bet it is possible after first run, to do a change in the configure script to add --default, which will skip those dialogue boxes

          1 Reply Last reply Reply Quote 0
          • B
            bulleribokk
            last edited by

            @mitu I figured perhaps there's some way to add mouse already prior to actual game load, and in the runcommand.sh line 957 there is something that looks like you can use as param for this purpose, is that right? How do I add the cursor the proper way, would you have some advice on that?

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @bulleribokk
              last edited by mitu

              Not a parameter, but you can replace the launch prefix from XINIT-WM with XINIT-WMC to not clear the mouse cursor, though I'd have expected that any game that runs fullscreen would use their own mouse handling and not rely on thw window manager/compositor to show the mouse.

              B 1 Reply Last reply Reply Quote 0
              • B
                bulleribokk @mitu
                last edited by

                I'll try that. So running sudo ./retropie_packages.sh mcpi configure multiple times, is normal/not harmful? Like I just add the one letter that's missing and run again? No need to remove or uninstall etc?

                @mitu said in MCPI and MCPI-reborn:

                I'd have expected that any game that runs fullscreen would use their own mouse handling

                Well the original minecraft-pi does ofc, once it is running you got the game cursor, but prior to that there's GTK zenity dialog boxes for enabling/disabling features, some settings, like setting your player name etc. I'll see if I can get cursor on that :)

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @bulleribokk
                  last edited by

                  @bulleribokk said in MCPI and MCPI-reborn:

                  I'll try that. So running sudo ./retropie_packages.sh mcpi configure multiple times, is normal/not harmful? Like I just add the one letter that's missing and run again? No need to remove or uninstall etc?

                  Yes.

                  1 Reply Last reply Reply Quote 0
                  • B
                    bulleribokk
                    last edited by

                    Your advice was great! With the XINIT-WMC there is mouse already prior to game load so it is easier to navigate through the GTK dialogue boxes, and there is no double mouse, i.e. when the game is up and running there's only the game mouse cursor visible :)

                    1 Reply Last reply Reply Quote 0
                    • F
                      fede843
                      last edited by fede843

                      Hi here. I have a rpi4, the original minecraft is not available.
                      When trying this, I get

                      Module 'mcpi' is not available for your system (rpi4)

                      Is it there a workaround here?

                      F 1 Reply Last reply Reply Quote 0
                      • F
                        fede843 @fede843
                        last edited by

                        all right, it was a silly one:

                        #!/usr/bin/env bash
                        rp_module_id="mcpi"
                        rp_module_desc="mcpi-reborn"
                        rp_module_licence="PROP"
                        rp_module_section="exp"
                        #rp_module_flags="!all videocore"
                        
                        function depends_mcpi() {
                            getDepends xorg matchbox-window-manager
                        }
                        
                        function install_bin_mcpi() {
                            [[ -f "$md_inst/minecraft-pi" ]] && rm -rf "$md_inst/"*
                            aptInstall minecraft-pi
                        }
                        
                        function remove_mcpi() {
                            aptRemove minecraft-pi
                        }
                        
                        function configure_mcpi() {
                            addPort "$md_id" "mcpi" "mcpi" "XINIT-WMC:/home/pi/RetroPie/roms/ports/.data/minecraft-pi-reborn-client-2.5.3-arm64.AppImage --default"
                        }
                        

                        Just needed to get rid of the filter flag.
                        And by the way, all those intro setup windows can be skipped using the --default flag.

                        Thank you!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.