Skip to content

Commit

Permalink
Use withPrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Edivad99 committed Jan 28, 2024
1 parent 2bf42d3 commit 8aeaacf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/api/java/mods/railcraft/api/core/RecipeJsonKeys.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*------------------------------------------------------------------------------
Copyright (c) Railcraft Reborn, 2023+
This work (the API) is licensed under the "MIT" License,
see LICENSE.md for details.
-----------------------------------------------------------------------------*/
package mods.railcraft.api.core;

public final class RecipeJsonKeys {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void save(Consumer<FinishedRecipe> finishedRecipe, ResourceLocation resou
var path = resourceLocation.getPath();
var customResourceLocation = RailcraftConstants.rl("blast_furnace/" + path);

var advancementId = RailcraftConstants.rl(String.format("recipes/%s", customResourceLocation.getPath()));
var advancementId = customResourceLocation.withPrefix("recipes/");

finishedRecipe.accept(new Result(customResourceLocation,
this.group == null ? "" : this.group, this.result, this.count, this.ingredient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void save(Consumer<FinishedRecipe> finishedRecipe, ResourceLocation resou
var path = resourceLocation.getPath();
var customResourceLocation = RailcraftConstants.rl("coke_oven/" + path);

var advancementId = RailcraftConstants.rl(String.format("recipes/%s", customResourceLocation.getPath()));
var advancementId = customResourceLocation.withPrefix("recipes/");

finishedRecipe.accept(new Result(customResourceLocation,
this.group == null ? "" : this.group, this.result, this.count, this.ingredient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public EmptyFluidContainerSlot(Container container, int slot, int x, int y) {
@Override
public boolean mayPlace(ItemStack item) {
return !item.isEmpty()
//&& item.getCount() == 1
&& item.getCount() == 1
&& FluidItemHelper.isEmptyContainer(item);
}
}

0 comments on commit 8aeaacf

Please sign in to comment.