Skip to content

Commit

Permalink
Things are still broken I am not sure why?
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarWind22 committed Nov 30, 2023
1 parent 97a81f9 commit 0154359
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public void onInitializeClient() {

for(ModShieldItem shield : module.getShieldItems()) {
shield.clientShieldInit();
shield.RegisterModelLayer();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.rendering.v1.EntityModelLayerRegistry;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.entity.model.EntityModelLayer;
import net.minecraft.client.render.entity.model.EntityModelLoader;
Expand Down Expand Up @@ -149,6 +150,14 @@ public ShieldEntityModel getShieldEntityModel() {
return this.shieldEntityModel;
}

/**
* Handles registering the model layer & setting up the client sprite registry callback
*/
@Environment(EnvType.CLIENT)
public void RegisterModelLayer(){
EntityModelLayerRegistry.registerModelLayer(this.getEntityModelLayer(), ShieldEntityModel::getTexturedModelData);
}

/**
* Handles rendering the banner for the shield
* @param stack ItemStack of the shield
Expand Down

0 comments on commit 0154359

Please sign in to comment.