-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #647 from nnnlog/1_20_3_support
Update for 1.20.3, fix registryData error for 1.20.2
- Loading branch information
Showing
10 changed files
with
105 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 16 additions & 2 deletions
18
src/main/java/packets/handler/ClientBoundConfigurationPacketHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/packets/handler/version/ClientBoundConfigurationPacketHandler_1_20_2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package packets.handler.version; | ||
|
||
import game.data.WorldManager; | ||
import game.data.dimension.DimensionCodec; | ||
import packets.handler.ClientBoundConfigurationPacketHandler; | ||
import packets.handler.PacketOperator; | ||
import proxy.ConnectionManager; | ||
import se.llbit.nbt.SpecificTag; | ||
|
||
import java.util.Map; | ||
|
||
public class ClientBoundConfigurationPacketHandler_1_20_2 extends ClientBoundConfigurationPacketHandler { | ||
public ClientBoundConfigurationPacketHandler_1_20_2(ConnectionManager connectionManager) { | ||
super(connectionManager); | ||
|
||
Map<String, PacketOperator> operators = getOperators(); | ||
WorldManager worldManager = WorldManager.getInstance(); | ||
|
||
operators.put("RegistryData", provider -> { | ||
SpecificTag registryData = provider.readNbtTag(); | ||
worldManager.setDimensionCodec(DimensionCodec.fromNbt(registryData)); | ||
|
||
return true; | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters