Skip to content

Commit 79eeeca

Browse files
adding some textures
1 parent 0c47b55 commit 79eeeca

File tree

8 files changed

+18
-94
lines changed

8 files changed

+18
-94
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ minecraft_version=1.21.1
1818
# as they do not follow standard versioning conventions.
1919
minecraft_version_range=[1.21.1,1.22)
2020
# The Neo version must agree with the Minecraft version to get a valid artifact
21-
neo_version=21.1.138
21+
neo_version=21.1.152
2222
# The Neo version range can use any version of Neo as bounds
2323
neo_version_range=[21.1.0,)
2424
# The loader version range can only use the major version of FML as bounds

src/main/java/com/rae/creatingspace/compat/jei/CSJei.java

Lines changed: 6 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -85,103 +85,19 @@ private <T extends Recipe<?>> CategoryBuilder<T> builder(Class<? extends T> reci
8585
return new CategoryBuilder<>(recipeClass);
8686
}
8787

88-
private class CategoryBuilder<T extends Recipe<?>> {
89-
private final Class<? extends T> recipeClass;
90-
private Predicate<CRecipes> predicate = cRecipes -> true;
91-
private IDrawable background;
92-
private IDrawable icon;
93-
94-
private final List<Consumer<List<RecipeHolder<T>>>> recipeListConsumers = new ArrayList<Consumer<List<RecipeHolder<T>>>>();
95-
private final List<Supplier<? extends ItemStack>> catalysts = new ArrayList<>();
88+
private class CategoryBuilder<T extends Recipe<?>> extends CreateRecipeCategory.Builder<T> {
9689

9790
public CategoryBuilder(Class<? extends T> recipeClass) {
98-
this.recipeClass = recipeClass;
99-
}
100-
101-
public CategoryBuilder<T> enableIf(Predicate<CRecipes> predicate) {
102-
this.predicate = predicate;
103-
return this;
104-
}
105-
106-
public CategoryBuilder<T> enableWhen(Function<CRecipes, ConfigBase.ConfigBool> configValue) {
107-
predicate = c -> configValue.apply(c).get();
108-
return this;
109-
}
110-
111-
public CategoryBuilder<T> addRecipeListConsumer(Consumer<List<RecipeHolder<T>>> consumer) {
112-
this.recipeListConsumers.add(consumer);
113-
return this;
114-
}
115-
116-
public CategoryBuilder<T> addTypedRecipes(IRecipeTypeInfo recipeTypeEntry) {
117-
Objects.requireNonNull(recipeTypeEntry);
118-
return this.addTypedRecipes(recipeTypeEntry::getType);
119-
}
120-
121-
public <I extends RecipeInput, R extends Recipe<I>> CategoryBuilder<T> addTypedRecipes(Supplier<RecipeType<R>> recipeType) {
122-
return this.addRecipeListConsumer((recipes) -> CreateJEI.consumeTypedRecipes((recipe) -> {
123-
if (this.recipeClass.isInstance(recipe.value())) {
124-
recipes.add((RecipeHolder<T>) recipe);
125-
}
126-
127-
}, (RecipeType)recipeType.get()));
128-
}
129-
130-
public CategoryBuilder<T> catalystStack(Supplier<ItemStack> supplier) {
131-
catalysts.add(supplier);
132-
return this;
91+
super(recipeClass);
13392
}
13493

135-
public CategoryBuilder<T> catalyst(Supplier<ItemLike> supplier) {
136-
return catalystStack(() -> new ItemStack(supplier.get()
137-
.asItem()));
138-
}
139-
140-
public CategoryBuilder<T> icon(IDrawable icon) {
141-
this.icon = icon;
142-
return this;
143-
}
144-
145-
public CategoryBuilder<T> itemIcon(ItemLike item) {
146-
icon(new ItemIcon(() -> new ItemStack(item)));
147-
return this;
148-
}
149-
150-
public CategoryBuilder<T> doubleItemIcon(ItemLike item1, ItemLike item2) {
151-
icon(new DoubleItemIcon(() -> new ItemStack(item1), () -> new ItemStack(item2)));
152-
return this;
153-
}
154-
155-
public CategoryBuilder<T> background(IDrawable background) {
156-
this.background = background;
157-
return this;
158-
}
159-
160-
public CategoryBuilder<T> emptyBackground(int width, int height) {
161-
background(new EmptyBackground(width, height));
162-
return this;
163-
}
164-
165-
public CreateRecipeCategory<T> build(String name, CreateRecipeCategory.Factory<T> factory) {
166-
Supplier<List<RecipeHolder<T>>> recipesSupplier;
167-
if (predicate.test(AllConfigs.server().recipes)) {
168-
recipesSupplier = () -> {
169-
List<RecipeHolder<T>> recipes = new ArrayList<>();
170-
for (Consumer<List<RecipeHolder<T>>> consumer : recipeListConsumers)
171-
consumer.accept(recipes);
172-
return recipes;
173-
};
174-
} else {
175-
recipesSupplier = Collections::emptyList;
176-
}
177-
178-
CreateRecipeCategory.Info<T> info = new CreateRecipeCategory.Info<>(
179-
new mezz.jei.api.recipe.RecipeType<>(CreatingSpace.resource(name), recipeClass),
180-
Component.translatable(CreatingSpace.MODID + ".recipe." + name), background, icon, recipesSupplier, catalysts);
181-
CreateRecipeCategory<T> category = factory.create(info);
94+
@Override
95+
public CreateRecipeCategory<T> build(ResourceLocation id, CreateRecipeCategory.Factory<T> factory) {
96+
CreateRecipeCategory<T> category = super.build(id, factory);
18297
allCategories.add(category);
18398
return category;
18499
}
100+
185101
}
186102

187103
@Override

src/main/java/com/rae/creatingspace/content/recipes/air_liquefying/AirLiquefierBlockEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public void tick(Level level, BlockPos pos, BlockState state, AirLiquefierBlockE
106106
if (processingTicks < 0) {
107107
float recipeSpeed = 1;
108108
if (currentRecipe instanceof ProcessingRecipe) {
109-
int t = ((ProcessingRecipe<?>) currentRecipe).getProcessingDuration();
109+
int t = ((ProcessingRecipe<?,?>) currentRecipe).getProcessingDuration();
110110
if (t != 0)
111111
recipeSpeed = t / 100f;
112112
}

src/main/java/com/rae/creatingspace/init/ingameobject/ItemInit.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public static ArrayList<ItemEntry<? extends Item>> registerEngineIngredientForMa
6363

6464
collector.add(REGISTRATE.item(
6565
name + "_engine_wall", Item::new)
66-
.recipe((c,p) ->
66+
/*.recipe((c,p) ->
6767
BaseRecipeProvider.GeneratedRecipe()
68-
).defaultModel()
68+
).defaultModel()*/
6969
.register());
7070
// Splitting off Andesite because we had to be difficult XD
7171
if (name == "andesite") {
5.78 KB
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"animation": {}
3+
}
3.68 KB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"animation": {
3+
"frametime": 2
4+
}
5+
}

0 commit comments

Comments
 (0)