@@ -3,10 +3,8 @@ package li.cil.oc.integration.jei
3
3
import java .util
4
4
import javax .annotation .Nonnull
5
5
6
- import net .minecraft .client .Minecraft
7
- import net .minecraft .item .ItemStack
8
- import net .minecraft .util .EnumChatFormatting
9
6
import com .google .common .base .Strings
7
+ import com .mojang .realmsclient .gui .ChatFormatting
10
8
import li .cil .oc .api
11
9
import li .cil .oc .api .driver .EnvironmentAware
12
10
import li .cil .oc .api .prefab .DriverTileEntity
@@ -19,7 +17,8 @@ import mezz.jei.api.gui.IRecipeLayout
19
17
import mezz .jei .api .recipe .BlankRecipeCategory
20
18
import mezz .jei .api .recipe .BlankRecipeWrapper
21
19
import mezz .jei .api .recipe .IRecipeHandler
22
- import mezz .jei .api .recipe .IRecipeWrapper
20
+ import _root_ .net .minecraft .client .Minecraft
21
+ import _root_ .net .minecraft .item .ItemStack
23
22
24
23
import scala .collection .convert .WrapAsJava ._
25
24
import scala .collection .convert .WrapAsScala ._
@@ -81,8 +80,8 @@ object CallbackDocHandler {
81
80
case VexPattern (head, tail) => (name + head, tail)
82
81
case _ => (name, doc)
83
82
}
84
- wrap(signature, 160 ).map(EnumChatFormatting .BLACK .toString + _).mkString(" \n " ) +
85
- EnumChatFormatting .RESET + " \n " +
83
+ wrap(signature, 160 ).map(ChatFormatting .BLACK .toString + _).mkString(" \n " ) +
84
+ ChatFormatting .RESET + " \n " +
86
85
wrap(documentation, 152 ).map(" " + _).mkString(" \n " )
87
86
}
88
87
}
@@ -92,11 +91,12 @@ object CallbackDocHandler {
92
91
protected def wrap (line : String , width : Int ) = Minecraft .getMinecraft.fontRendererObj.listFormattedStringToWidth(line, width)
93
92
94
93
object CallbackDocRecipeHandler extends IRecipeHandler [CallbackDocRecipe ] {
95
-
96
94
override def getRecipeWrapper (recipe : CallbackDocRecipe ) = recipe
97
95
98
96
override def getRecipeCategoryUid = CallbackDocRecipeCategory .getUid
99
97
98
+ override def getRecipeCategoryUid (recipe : CallbackDocRecipe ): String = getRecipeCategoryUid
99
+
100
100
override def isRecipeValid (recipe : CallbackDocRecipe ) = true
101
101
102
102
override def getRecipeClass = classOf [CallbackDocRecipe ]
@@ -113,9 +113,7 @@ object CallbackDocHandler {
113
113
}
114
114
}
115
115
116
- object CallbackDocRecipeCategory extends BlankRecipeCategory {
117
-
118
-
116
+ object CallbackDocRecipeCategory extends BlankRecipeCategory [CallbackDocRecipe ] {
119
117
val recipeWidth : Int = 160
120
118
val recipeHeight : Int = 125
121
119
private var background : IDrawable = null
@@ -126,8 +124,7 @@ object CallbackDocHandler {
126
124
127
125
override def getBackground : IDrawable = background
128
126
129
- override def setRecipe (recipeLayout : IRecipeLayout , recipeWrapper : IRecipeWrapper ) {
130
-
127
+ override def setRecipe (recipeLayout : IRecipeLayout , recipeWrapper : CallbackDocRecipe ) {
131
128
}
132
129
133
130
override def getTitle = " OpenComputers API"
0 commit comments