More ClientOnlyMixin
This commit is contained in:
parent
7c57ffd2c6
commit
7be382a3ce
|
|
@ -3,6 +3,7 @@ package org.embeddedt.modernfix.common.mixin.bugfix.world_screen_skipped;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen;
|
import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen;
|
||||||
import net.minecraft.client.gui.screens.worldselection.WorldSelectionList;
|
import net.minecraft.client.gui.screens.worldselection.WorldSelectionList;
|
||||||
|
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
|
@ -11,6 +12,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
@Mixin(WorldSelectionList.WorldListEntry.class)
|
@Mixin(WorldSelectionList.WorldListEntry.class)
|
||||||
|
@ClientOnlyMixin
|
||||||
public class WorldSelectionListMixin {
|
public class WorldSelectionListMixin {
|
||||||
@Shadow @Final private Minecraft minecraft;
|
@Shadow @Final private Minecraft minecraft;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.google.common.cache.Cache;
|
||||||
import com.google.common.cache.CacheBuilder;
|
import com.google.common.cache.CacheBuilder;
|
||||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
||||||
import net.minecraft.client.resources.SkinManager;
|
import net.minecraft.client.resources.SkinManager;
|
||||||
|
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Unique;
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
|
@ -13,6 +14,7 @@ import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@Mixin(SkinManager.class)
|
@Mixin(SkinManager.class)
|
||||||
|
@ClientOnlyMixin
|
||||||
public class SkinManagerMixin {
|
public class SkinManagerMixin {
|
||||||
@Unique
|
@Unique
|
||||||
private final Cache<MinecraftProfileTexture, String> mfix$hashCache = CacheBuilder.newBuilder()
|
private final Cache<MinecraftProfileTexture, String> mfix$hashCache = CacheBuilder.newBuilder()
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package org.embeddedt.modernfix.fabric.mixin.safety;
|
||||||
import com.mojang.blaze3d.platform.NativeImage;
|
import com.mojang.blaze3d.platform.NativeImage;
|
||||||
import net.minecraft.client.renderer.texture.DynamicTexture;
|
import net.minecraft.client.renderer.texture.DynamicTexture;
|
||||||
import org.embeddedt.modernfix.ModernFix;
|
import org.embeddedt.modernfix.ModernFix;
|
||||||
|
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
|
@ -11,6 +12,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
@Mixin(DynamicTexture.class)
|
@Mixin(DynamicTexture.class)
|
||||||
|
@ClientOnlyMixin
|
||||||
public class DynamicTextureMixin {
|
public class DynamicTextureMixin {
|
||||||
@Shadow @Nullable private NativeImage pixels;
|
@Shadow @Nullable private NativeImage pixels;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,13 @@ import com.mojang.serialization.Lifecycle;
|
||||||
import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen;
|
import net.minecraft.client.gui.screens.worldselection.CreateWorldScreen;
|
||||||
import net.minecraft.world.level.storage.PrimaryLevelData;
|
import net.minecraft.world.level.storage.PrimaryLevelData;
|
||||||
import net.minecraft.world.level.storage.WorldData;
|
import net.minecraft.world.level.storage.WorldData;
|
||||||
|
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||||
|
|
||||||
@Mixin(CreateWorldScreen.class)
|
@Mixin(CreateWorldScreen.class)
|
||||||
|
@ClientOnlyMixin
|
||||||
public class CreateWorldScreenMixin {
|
public class CreateWorldScreenMixin {
|
||||||
/**
|
/**
|
||||||
* Fix experimental world dialog still being shown the first time you reopen a world that was created
|
* Fix experimental world dialog still being shown the first time you reopen a world that was created
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user