How to Create and Render a Client-Side World #4075
Unanswered
zkhssb
asked this question in
Mod Dev Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I am developing a fabric-mod for version 1.20.4, and I want to make the TitleScreen more engaging by rendering players in a client-side world (similar to Minecraft: Dungeons):
![751dea87110a522e95a8f25295becc5d](https://private-user-images.githubusercontent.com/66494674/365399330-29d9eb18-efd1-4faf-ab54-17bca99eb1e2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzUwNjYxNzUsIm5iZiI6MTczNTA2NTg3NSwicGF0aCI6Ii82NjQ5NDY3NC8zNjUzOTkzMzAtMjlkOWViMTgtZWZkMS00ZmFmLWFiNTQtMTdiY2E5OWViMWUyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEyMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMjI0VDE4NDQzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkyYjYxNTE2ZmE5YTY0Y2Q5ZDYwMzA1MzZjNWZkNzI3NDNmYTliYTdiMTFlNmM5ZjUzNjBlMzFlMTNhZDZmNTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.V3X1wFamWPdpWZVMJJV9Bx18110yjKljZRuDvCbInVA)
![image](https://private-user-images.githubusercontent.com/66494674/365399734-7e273b72-6924-4cfd-a275-b5cdbd088425.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzUwNjYxNzUsIm5iZiI6MTczNTA2NTg3NSwicGF0aCI6Ii82NjQ5NDY3NC8zNjUzOTk3MzQtN2UyNzNiNzItNjkyNC00Y2ZkLWEyNzUtYjVjZGJkMDg4NDI1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDEyMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMjI0VDE4NDQzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwYTc2NjNlOWFkZTA2ZWY0NGQ3NGRjMjQ1ZjQxYjA3NDMxNmJjMzM4MWVmM2Y4ODE5NmZiM2Y0OGIzOGZlZDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.YQX4jdPeyPFLZWCwl07HqSvgWyKG7MZrOsvJP6TJ7BU)
My general idea is:
Create a world that exists only on the client side
Then I tried to create a world and have the client load it after the
MinecraftClient.onFinishedLoading
method is called:But I ran into trouble...
networkHandler
is not initialized at this point, so I can't create a world, and the final result of the code isNullPointerException
The call to
ClientBackgroundWorld
threw an exception when calling its superclass method, and I think my approach to creating the world is entirely wrong ;-;So... I don't know how to create a world that exists only on the client side and how to load the structures.
I seek the assistance of experienced developers to provide some guidance!
Beta Was this translation helpful? Give feedback.
All reactions