mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 03:15:07 +00:00
Fix red string renderer freaking because alpha is less than 0
This commit is contained in:
1 parent
1954b69e16
commit
a6ad70f0bc
1 file changed
+5
-1
@@ -40,7 +40,7 @@ public class RenderTileRedString extends TileEntityRenderer<TileRedString> {
|
||||
boolean hasWand = player != null && PlayerHelper.hasHeldItem(player, ModItems.twigWand);
|
||||
if(sizeAlpha > 0F && !hasWand)
|
||||
sizeAlpha -= 0.1F;
|
||||
else if(sizeAlpha < 1F &&hasWand)
|
||||
else if(sizeAlpha < 1F && hasWand)
|
||||
sizeAlpha += 0.1F;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,10 @@ public class RenderTileRedString extends TileEntityRenderer<TileRedString> {
|
||||
|
||||
@Override
|
||||
public void render(TileRedString tile, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers, int light, int overlay) {
|
||||
if (sizeAlpha < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
int color = 0xFF0000 | ((int) (sizeAlpha * 255) << 24);
|
||||
|
||||
Direction dir = tile.getOrientation();
|
||||
|
||||
Reference in new issue
Block a user