9
9
10
10
package dev .lambdaurora .lambdynlights .api .item ;
11
11
12
+ import com .google .gson .JsonParser ;
12
13
import dev .lambdaurora .lambdynlights .LambDynLights ;
13
14
import net .minecraft .item .BlockItem ;
14
15
import net .minecraft .item .ItemStack ;
15
16
import net .minecraft .resource .ResourceManager ;
16
17
import net .minecraft .util .Identifier ;
17
18
import net .minecraft .util .registry .Registry ;
18
- import org .aperlambda .lambdacommon .LambdaConstants ;
19
19
import org .jetbrains .annotations .NotNull ;
20
20
21
21
import java .io .IOException ;
27
27
* Represents an item light sources manager.
28
28
*
29
29
* @author LambdAurora
30
- * @version 1.3.2
30
+ * @version 2.0.1
31
31
* @since 1.3.0
32
32
*/
33
33
public final class ItemLightSources {
34
+ private static final JsonParser JSON_PARSER = new JsonParser ();
34
35
private static final List <ItemLightSource > ITEM_LIGHT_SOURCES = new ArrayList <>();
35
36
private static final List <ItemLightSource > STATIC_ITEM_LIGHT_SOURCES = new ArrayList <>();
36
37
@@ -55,7 +56,7 @@ private static void load(@NotNull ResourceManager resourceManager, @NotNull Iden
55
56
var id = new Identifier (resourceId .getNamespace (), resourceId .getPath ().replace (".json" , "" ));
56
57
try {
57
58
var stream = resourceManager .getResource (resourceId ).getInputStream ();
58
- var json = LambdaConstants . JSON_PARSER .parse (new InputStreamReader (stream )).getAsJsonObject ();
59
+ var json = JSON_PARSER .parse (new InputStreamReader (stream )).getAsJsonObject ();
59
60
60
61
ItemLightSource .fromJson (id , json ).ifPresent (data -> {
61
62
if (!STATIC_ITEM_LIGHT_SOURCES .contains (data ))
0 commit comments