Skip to content

Commit

Permalink
Immediately migrate away from Fabric Internals, remove Mixin Plugin, c…
Browse files Browse the repository at this point in the history
…loses #117

Signed-off-by: Noaaan <noaaan@hotmail.com>
  • Loading branch information
Noaaan committed Oct 3, 2022
1 parent 42cf836 commit 79c5add
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 50 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies {
modApi("com.terraformersmc:modmenu:${project.modmenu_version}")

// Origins compat
modImplementation "com.github.apace100:origins-fabric:${project.origins_version}"
modCompileOnly "com.github.apace100:origins-fabric:${project.origins_version}"

// MM Decorations
//modRuntimeOnly("nourl:MythicMetalsDecorations:${project.mmdecorations_version}")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package nourl.mythicmetals.mixin;

import net.minecraft.client.render.entity.model.EntityModelLayer;
import net.minecraft.client.render.entity.model.EntityModelLayers;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

import java.util.Set;

@Mixin(EntityModelLayers.class)
public interface EntityModelLayersAccessor {

@Accessor
static Set<EntityModelLayer> getLAYERS() {
throw new UnsupportedOperationException();
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package nourl.mythicmetals.models;

import net.fabricmc.fabric.mixin.client.rendering.EntityModelLayersAccessor;
import net.minecraft.client.model.Dilation;
import net.minecraft.client.model.TexturedModelData;
import net.minecraft.client.render.entity.model.EntityModelLayer;
import net.minecraft.client.render.entity.model.PlayerEntityModel;
import net.minecraft.util.Identifier;
import nourl.mythicmetals.mixin.EntityModelLayersAccessor;
import nourl.mythicmetals.utils.RegistryHelper;

import java.util.function.BiConsumer;
Expand Down Expand Up @@ -33,7 +33,7 @@ public static void init(BiConsumer<EntityModelLayer, TexturedModelData> consumer
*/
public static EntityModelLayer model(String name, String layer) {
var result = new EntityModelLayer(RegistryHelper.id(name), layer);
EntityModelLayersAccessor.getLayers().add(result);
EntityModelLayersAccessor.getLAYERS().add(result);
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mythicmetals.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
],
"client": [
"CapeFeatureRendererMixin",
"EntityModelLayersAccessor",
"ElytraFeatureRendererMixin",
"WorldRendererInvoker"
],
"plugin": "nourl.mythicmetals.mixin.MythicMetalsMixinPlugin",
"injectors": {
"defaultRequire": 1
}
Expand Down

0 comments on commit 79c5add

Please sign in to comment.