Minor mixin organization

- Move LevelRendererInstanceUpdateMixin to instancemanage package
- Ensure flywheel$ prefix is added to all mixin injector methods
This commit is contained in:
PepperCode1 2023-03-29 18:32:08 -07:00
parent 6b9b2a9927
commit a526a48d23
4 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@ import net.minecraft.client.main.Main;
@Mixin(Main.class)
public class ClientMainMixin {
@Inject(method = "main", at = @At("HEAD"))
private static void injectRenderDoc(CallbackInfo ci) {
private static void flywheel$injectRenderDoc(CallbackInfo ci) {
// Only try to load RenderDoc if a system property is set.
if (System.getProperty("flw.loadRenderDoc") == null) {
return;

View File

@ -55,7 +55,7 @@ public class LevelRendererMixin {
}
@Inject(at = @At("TAIL"), method = "allChanged")
private void refresh(CallbackInfo ci) {
private void flywheel$refresh(CallbackInfo ci) {
Backend.refresh();
MinecraftForge.EVENT_BUS.post(new ReloadRenderersEvent(level));

View File

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.mixin;
package com.jozufozu.flywheel.mixin.instancemanage;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@ -16,7 +16,7 @@ import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
@Mixin(LevelRenderer.class)
public class LevelRendererInstanceUpdateMixin {
public class InstanceUpdateMixin {
@Shadow
private ClientLevel level;

View File

@ -14,7 +14,6 @@
"FogUpdateMixin",
"GlStateManagerMixin",
"LevelRendererAccessor",
"LevelRendererInstanceUpdateMixin",
"LevelRendererMixin",
"PausedPartialTickAccessor",
"RenderTypeMixin",
@ -22,6 +21,7 @@
"instancemanage.ChunkRebuildHooksMixin",
"instancemanage.InstanceAddMixin",
"instancemanage.InstanceRemoveMixin",
"instancemanage.InstanceUpdateMixin",
"light.LightUpdateMixin",
"light.NetworkLightUpdateMixin",
"matrix.Matrix3fAccessor",