Add .blend export
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.replaymod.render.blend.mixin;
|
||||
|
||||
import com.replaymod.render.blend.BlendState;
|
||||
import com.replaymod.render.blend.exporters.ItemExporter;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.item.ItemStack;
|
||||
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;
|
||||
|
||||
@Mixin(RenderItem.class)
|
||||
public abstract class MixinRenderItem {
|
||||
@Inject(method = "renderModel(Lnet/minecraft/client/resources/model/IBakedModel;Lnet/minecraft/item/ItemStack;)V",
|
||||
at = @At("HEAD"))
|
||||
private void onRenderModel(IBakedModel model, ItemStack stack, CallbackInfo ci) {
|
||||
BlendState blendState = BlendState.getState();
|
||||
if (blendState != null) {
|
||||
blendState.get(ItemExporter.class).onRender(model, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user