mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 20:42:35 +00:00
Fix #1209 Crash when opening farm gui
This commit is contained in:
1 parent
afbde2d735
commit
520c053cbc
1 file changed
+1
-7
@@ -49,14 +49,8 @@ public class FarmLedger extends Ledger {
|
||||
|
||||
// Draw icon
|
||||
Minecraft minecraft = Proxies.common.getClientInstance();
|
||||
RenderItem renderItem = minecraft.getRenderItem();
|
||||
ItemModelMesher itemModelMesher = renderItem.getItemModelMesher();
|
||||
IBakedModel iBakedModel = itemModelMesher.getItemModel(new ItemStack(Items.WATER_BUCKET));
|
||||
|
||||
TextureMap textureMapBlocks = minecraft.getTextureMapBlocks();
|
||||
TextureAtlasSprite particleTexture = iBakedModel.getParticleTexture();
|
||||
String particleTextureIconName = particleTexture.getIconName();
|
||||
TextureAtlasSprite textureAtlasSprite = textureMapBlocks.getAtlasSprite(particleTextureIconName);
|
||||
TextureAtlasSprite textureAtlasSprite = textureMapBlocks.getAtlasSprite("minecraft:items/bucket_water");
|
||||
|
||||
drawSprite(textureAtlasSprite, xIcon, y);
|
||||
y += 4;
|
||||
|
||||
Reference in new issue
Block a user