diff options
author | SHsuperCM <shsupercm@gmail.com> | 2022-01-22 17:54:26 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2022-01-22 17:54:26 +0200 |
commit | b16f0e068ba375d0b21456811a0ae5f68a77eba0 (patch) | |
tree | 8711f21b9826372c6c41bf6bd54c6d76957f1595 /src/main/java/shcm/shsupercm/fabric/citresewn/mixin | |
parent | ffd25dce4e101c478e13867ebb5995f07cd68039 (diff) | |
download | CITResewn-b16f0e068ba375d0b21456811a0ae5f68a77eba0.tar.gz CITResewn-b16f0e068ba375d0b21456811a0ae5f68a77eba0.tar.bz2 CITResewn-b16f0e068ba375d0b21456811a0ae5f68a77eba0.zip |
Implemented global properties api and started pack parsing/active cits
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/mixin')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java new file mode 100644 index 0000000..e37ea6d --- /dev/null +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/ModelLoaderMixin.java @@ -0,0 +1,22 @@ +package shcm.shsupercm.fabric.citresewn.mixin; + +import net.minecraft.client.color.block.BlockColors; +import net.minecraft.client.render.model.ModelLoader; +import net.minecraft.resource.ResourceManager; +import net.minecraft.util.profiler.Profiler; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import shcm.shsupercm.fabric.citresewn.pack.ActiveCITs; + +@Mixin(ModelLoader.class) +public class ModelLoaderMixin { + @Inject(method = "<init>", at = + @At(value = "INVOKE", ordinal = 0, target = "Lnet/minecraft/util/profiler/Profiler;push(Ljava/lang/String;)V")) + private void loadCITs(ResourceManager resourceManager, BlockColors blockColors, Profiler profiler, int i, CallbackInfo ci) { + profiler.push("citresewn:reloading_cits"); + ActiveCITs.load(resourceManager, profiler); + profiler.pop(); + } +} |