This is a port to Minecraft 1.18.2, skipping Minecraft 1.17.1. All the changes I made are visible in the individual commits, but here's a list of some bigger ones:
All block entities had their client fields removed. The client can just use the same fields as the server, because there are different instances of the class anyway.
The use of LazyOptional has been corrected. Instead of creating a new LazyOptional each time getCapability is called (which defeates its use), the object is initialized once, and then just cast and returned.
The custom container synchronization code has been removed and replaced with individual sync calls where needed.
Block entities now tick on both sides so progress can be shown in the GUI
Class, field, parameter, and local variable renames have been performed to match vanilla's naming schemes
Changed to using extractEnergy/receiveEnergy in MyEnergyStorage instead of custom methods
Loot tables have been fixed, the blocks can now be broken and only drop when broken with any pickaxe. This is a bug in 1.16.
Do note, that because there is no 1.18.2 branch on this repo, you'll need to create one and change the target branch of this PR before merging. This PR is based on the 1.16.4 branch.
This is a port to Minecraft 1.18.2, skipping Minecraft 1.17.1. All the changes I made are visible in the individual commits, but here's a list of some bigger ones:
LazyOptional
has been corrected. Instead of creating a newLazyOptional
each timegetCapability
is called (which defeates its use), the object is initialized once, and then just cast and returned.MyEnergyStorage
instead of custom methodsDo note, that because there is no 1.18.2 branch on this repo, you'll need to create one and change the target branch of this PR before merging. This PR is based on the 1.16.4 branch.