Skip to content

Latest commit

 

History

History
92 lines (80 loc) · 5.91 KB

UPGRADING_TO_NEXT_MINECRAFT.md

File metadata and controls

92 lines (80 loc) · 5.91 KB

Thank you

Thank your for your interest in contributing with PowerNukkit.

We really need your help by testing, finding and reporting bugs and compatibility issues, suggesting features, and submitting pull requests with enhancements and bug-fixes.

How to upgrade PowerNukkit to the next Minecraft protocol version

First thing first, we need to know what exactly has changed to the protocol.

Finding what changed

Update Bedrock-ProxyPass, Bedrock-Protocol, and Bedrock-Network

Now that we know what have change, we need to update:

Setting up Bedrock-ProxyPass in IntelliJ IDEA

  • Checkout and open as a project: https://github.com/PowerNukkit/Bedrock-ProxyPass.git
  • Checkout but don't open as a project, only download the source: https://github.com/PowerNukkit/Bedrock-Network
  • Checkout but don't open as a project, only download the source: https://github.com/PowerNukkit/Bedrock-Protocol
  • Open the Maven tab, click the + button to add a maven project to the current project (That should be Bedrock-ProxyPass)
  • Add: Bedrock-Network, and Bedrock-Protocol that you have just downloaded
  • Press Shift two times to open the search window and search for the Action: manage git remotes
  • Add a new remote for all 3 git repositores, pointing to the cloudburst equivalent of the project:
  • Open the Git menu at the top of the window and click Fetch
  • Open the Git tab at the bottom of the Window and open the Log: tab
  • Click Paths: All and deselect all 3 roots
  • Click Paths: No roots and select only Bedrock-Network
  • Find the last commit tagged cloudburst/develop
  • Right click it and select: Branch 'cloudburst/develop' -> Pull into current using merge (manual merge may be necessary)
  • Click Paths: button again and select only Bedrock-Protocol and do the same
  • Repeat this process with Bedrock-ProxyPass but find the cloudburst/master tag in the logs instead of cloudburst/develop
  • Manually adjust the pom.xml of the last bedrock-vNNN module at Bedrock Protocol
  • You may need to update the ProxyPass.CODEC manually too.
  • Build and run ProxyPass proxying Vanilla Bedrock Dedicated Server with the config to export data enabled
  • Connect to the vanilla bedrock server thought the proxy for it to extract the necessary data from the connection.

Run the update tools

Now that you have extracted the data, confirm that PMMP have released the last BedrockData, the update tools make use of that: https://github.com/pmmp/BedrockData

The update tools are classes that are located at the test folder of this project, they have some pre-requisites explained in the comments right on top of the files, make sure they are fulfilled before running or things can go wrong...

  • Adjust the path in org.powernukkit.updater.AllResourcesDownloader.main(String[]) to point to the data folder in your ProxyPass run folder, some data will be loaded from there
  • Run org.powernukkit.updater.AllResourcesDownloader.main(String[])
  • Run mvn clean package (Don't skip!)
  • Run org.powernukkit.updater.RuntimeItemIdUpdater.main(String[])
  • Run mvn clean package (Don't skip!)
  • Run org.powernukkit.dumps.ItemIdDumper.main(String[])
  • Run org.powernukkit.dumps.RuntimeBlockStateDumper.main(String[])
  • Adjust all necessary block properties
  • Run org.powernukkit.updater.AllResourceUpdater.main(String[])
  • Run mvn clean package (Don't skip!)

After the update

Try to start the server, make sure no error or warning is logged, new blocks/items may cause issues, and we need to fix or handle them from the Java classes, without changing any resource, only Java code!

Some existing blocks may receive new block state properties, make sure to update their class file to include the new properties

Some properties may receive new values, update them too.

You can check what has changed investigating the files in the dumps folder, they give you different views of the blocks, items, and block states, so we can find what's happening easier.