mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 08:00:02 +03:00
32 lines
1.6 KiB
Diff
32 lines
1.6 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/gui/toasts/RecipeToast.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/gui/toasts/RecipeToast.java
|
|
@@ -23,7 +23,7 @@
|
|
this.recipesOutputs.add(p_i47489_1_);
|
|
}
|
|
|
|
- public IToast.Visibility draw(GuiToast toastGui, long delta)
|
|
+ public Visibility draw(GuiToast toastGui, long delta)
|
|
{
|
|
if (this.hasNewOutputs)
|
|
{
|
|
@@ -33,7 +33,7 @@
|
|
|
|
if (this.recipesOutputs.isEmpty())
|
|
{
|
|
- return IToast.Visibility.HIDE;
|
|
+ return Visibility.HIDE;
|
|
}
|
|
else
|
|
{
|
|
@@ -43,8 +43,8 @@
|
|
toastGui.getMinecraft().fontRenderer.drawString(I18n.format("recipe.toast.title"), 30, 7, -11534256);
|
|
toastGui.getMinecraft().fontRenderer.drawString(I18n.format("recipe.toast.description"), 30, 18, -16777216);
|
|
RenderHelper.enableGUIStandardItemLighting();
|
|
- toastGui.getMinecraft().getRenderItem().renderItemAndEffectIntoGUI((EntityLivingBase)null, this.recipesOutputs.get((int)(delta / (5000L / (long)this.recipesOutputs.size()) % (long)this.recipesOutputs.size())), 8, 8);
|
|
- return delta - this.firstDrawTime >= 5000L ? IToast.Visibility.HIDE : IToast.Visibility.SHOW;
|
|
+ toastGui.getMinecraft().getRenderItem().renderItemAndEffectIntoGUI((EntityLivingBase)null, this.recipesOutputs.get((int)(delta * (long)this.recipesOutputs.size() / 5000L % (long)this.recipesOutputs.size())), 8, 8); //Forge: fix math so that it doesn't divide by 0 when there are more than 5000 recipes
|
|
+ return delta - this.firstDrawTime >= 5000L ? Visibility.HIDE : Visibility.SHOW;
|
|
}
|
|
}
|
|
|