Skip to content

Commit

Permalink
Change InventoryModels
Browse files Browse the repository at this point in the history
  • Loading branch information
FirstMegaGame4 committed Apr 25, 2024
1 parent 89d3aec commit 5b1e596
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@FunctionalInterface
public interface InventoryModels {

Set<Identifier> MODDED_HANDHELD_MODELS = new HashSet<>();
Set<Identifier> REGISTRY = new HashSet<>();

Event<InventoryModels> EVENT = Event.create(InventoryModels.class, callbacks -> stack -> {
for (InventoryModels callback : callbacks) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
import net.minecraft.client.render.item.ItemModels;
import net.minecraft.client.render.item.ItemRenderer;
import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.render.model.json.ModelOverrideList;
import net.minecraft.client.render.model.json.ModelTransformation;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import org.spongepowered.asm.mixin.Final;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public abstract class ModelLoaderMixin {

@Inject(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/ModelLoader;addModel(Lnet/minecraft/client/util/ModelIdentifier;)V", shift = At.Shift.AFTER, ordinal = 1))
private void appendModdedModels(ResourceManager resourceManager, BlockColors blockColors, Profiler profiler, int i, CallbackInfo ci) {
InventoryModels.MODDED_HANDHELD_MODELS.forEach(this::mmodding_lib$addModdedModel);
InventoryModels.REGISTRY.forEach(this::mmodding_lib$addModdedModel);
}

@Unique
Expand Down

0 comments on commit 5b1e596

Please sign in to comment.