mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
Invisi-bucket
- Fixed filter slot display issues with Forge's multi-layered item models
This commit is contained in:
parent
af9d6075ff
commit
d1810f5173
1 changed files with 2 additions and 1 deletions
|
@ -16,13 +16,14 @@ import net.minecraft.item.BlockItem;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraftforge.client.model.ItemMultiLayerBakedModel;
|
||||
|
||||
public class ValueBoxRenderer {
|
||||
|
||||
public static void renderItemIntoValueBox(ItemStack filter, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
|
||||
ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer();
|
||||
IBakedModel modelWithOverrides = itemRenderer.getModel(filter, Minecraft.getInstance().level, null);
|
||||
boolean blockItem = modelWithOverrides.isGui3d();
|
||||
boolean blockItem = modelWithOverrides.isGui3d() && !(modelWithOverrides instanceof ItemMultiLayerBakedModel);
|
||||
float scale = (!blockItem ? .5f : 1f) - 1 / 64f;
|
||||
float zOffset = (!blockItem ? -.225f : 0) + customZOffset(filter.getItem());
|
||||
ms.scale(scale, scale, scale);
|
||||
|
|
Loading…
Reference in a new issue