mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 04:09:51 +00:00
Change default BrewingRecipe to use an Ingredient for the input instead of ItemStack. Closes #5944
Add AT for GameRules.register Closes #5946 Fix Forge Blockstate loader model path is inconsistent with vanilla blockstates Closes #5892 Fix client crashing when opting not to load a world when there's missing blocks Closes #5886
This commit is contained in:
1 parent
e6f032db1b
commit
cb21e95e0b
5 files changed
+27
-22
No files matched your search
@@ -448,8 +448,7 @@ public class ForgeBlockStateV1 extends Marker
|
||||
|
||||
protected ResourceLocation getBlockLocation(String location)
|
||||
{
|
||||
ResourceLocation tmp = new ResourceLocation(location);
|
||||
return new ResourceLocation(tmp.getNamespace(), "block/" + tmp.getPath());
|
||||
return new ResourceLocation(location); //Vanilla 1.14 removed automatic block prefixes. See https://github.com/MinecraftForge/MinecraftForge/issues/5892
|
||||
}
|
||||
|
||||
/** Throws an error if there are submodels in this submodel. */
|
||||
|
||||
@@ -26,11 +26,11 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public class BrewingRecipe implements IBrewingRecipe
|
||||
{
|
||||
@Nonnull private final ItemStack input;
|
||||
@Nonnull private final Ingredient input;
|
||||
@Nonnull private final Ingredient ingredient;
|
||||
@Nonnull private final ItemStack output;
|
||||
|
||||
public BrewingRecipe(ItemStack input, Ingredient ingredient, ItemStack output)
|
||||
public BrewingRecipe(Ingredient input, Ingredient ingredient, ItemStack output)
|
||||
{
|
||||
this.input = input;
|
||||
this.ingredient = ingredient;
|
||||
@@ -40,7 +40,7 @@ public class BrewingRecipe implements IBrewingRecipe
|
||||
@Override
|
||||
public boolean isInput(@Nonnull ItemStack stack)
|
||||
{
|
||||
return ingredient.test(stack);
|
||||
return this.input.test(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,7 +49,7 @@ public class BrewingRecipe implements IBrewingRecipe
|
||||
return isInput(input) && isIngredient(ingredient) ? getOutput().copy() : ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
public ItemStack getInput()
|
||||
public Ingredient getInput()
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
@@ -40,16 +40,16 @@ public class BrewingRecipeRegistry {
|
||||
* inputs that stack (a.k.a max stack size > 1) are not allowed.
|
||||
*
|
||||
* @param input
|
||||
* The ItemStack that goes in same slots as the water bottles
|
||||
* The Ingredient that goes in same slots as the water bottles
|
||||
* would.
|
||||
* @param ingredient
|
||||
* The ItemStack that goes in the same slot as nether wart would.
|
||||
* The Ingredient that goes in the same slot as nether wart would.
|
||||
* @param output
|
||||
* The ItemStack that will replace the input once the brewing is
|
||||
* done.
|
||||
* @return true if the recipe was added.
|
||||
*/
|
||||
public static boolean addRecipe(ItemStack input, Ingredient ingredient, ItemStack output)
|
||||
public static boolean addRecipe(Ingredient input, Ingredient ingredient, ItemStack output)
|
||||
{
|
||||
return addRecipe(new BrewingRecipe(input, ingredient, output));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user