Fixes #2533 and #2531: Slight overhaul to how Facades store the associated item and retrieve the sprite.

This commit is contained in:
Sebastian Hartte
2016-10-30 15:19:48 +01:00
parent c2b5a58dd2
commit 971fc3d243
5 changed files with 86 additions and 95 deletions
@@ -23,7 +23,6 @@ import java.util.Collections;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.block.model.IBakedModel;
@@ -108,11 +107,7 @@ public class FacadeDispatcherBakedModel implements IBakedModel
ItemFacade itemFacade = (ItemFacade) stack.getItem();
Block block = itemFacade.getBlock( stack );
int meta = itemFacade.getMeta( stack );
// This is kinda fascinating, how do we get the meta from the itemblock
IBlockState state = block.getStateFromMeta( meta );
IBlockState state = itemFacade.getTextureBlockState( stack );
return new FacadeWithBlockBakedModel( baseModel, state, format );
}