Skip to content

Conversation

xpple
Copy link
Collaborator

@xpple xpple commented May 28, 2022

Closes #407. This PR replaces most occurrences of MinecraftClient#getInstance with FabricClientCommandSource#getClient and replaces ClientCommandHelper#sendFeedback and ClientCommandHelper#sendError with FabricClientCommandSource#sendFeedback and FabricClientCommandSource#sendError respectively. Where applicable, access of the player or world through the client instance have been replaced with the according methods of FabricClientCommandSource. In some occasions it wasn't possible or wouldn't have been beneficial towards the readability of the code to replace a call to MinecraftClient#getInstance (for example FindItemCommand and MoteCommand), so I didn't apply any changes there.

@Earthcomputer Earthcomputer merged commit d5b7485 into Earthcomputer:fabric Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the FabricClientCommandSource#getClient method to access the Minecraft client instance

2 participants