Posted February 9, 20214 yr I want to make an object of ServerWorld inside the Item#onItemUse method. I am very new to java and modding and I need help. I tried doing ServerWorld world = new Serverworld(...); but it has a lot of parameters. So how should I do this?
February 9, 20214 yr You should never create a new instance of a world, the vanilla code handles that for you. In this case, you have access to the world via ItemUseContext.getWorld().
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.