Peach blocks and Peach forest
Elka, Glimmer, Deer Toned down alpha mantis spawns Increased uranium and titanium spawn by 25% Overhauled red ant nest and pale nyxite texture Fixed Ant Nests not spawning on Fabric Fixed armor trims not working on antarchy armors Fixed antarchy materials not working as armor trims Adding missing hanging sign gui texture files HFCS Root beer Elythia frog Roseate and Lumen froglight
This commit is contained in:
1 parent
89d9aff0b9
commit
79cbc454e6
561 files changed
+22472
-3149
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.api.registry;
|
||||
|
||||
import net.fabricmc.fabric.api.event.Event;
|
||||
import net.fabricmc.fabric.api.event.EventFactory;
|
||||
import net.minecraft.class_1792;
|
||||
import net.minecraft.class_1842;
|
||||
import net.minecraft.class_1845;
|
||||
import net.minecraft.class_1856;
|
||||
import net.minecraft.class_6880;
|
||||
import net.minecraft.class_7699;
|
||||
|
||||
/**
|
||||
* An extension of {@link class_1845.class_9665} to support ingredients.
|
||||
*/
|
||||
public interface FabricBrewingRecipeRegistryBuilder {
|
||||
/**
|
||||
* An event that is called when the brewing recipe registry is being built.
|
||||
*/
|
||||
Event<FabricBrewingRecipeRegistryBuilder.BuildCallback> BUILD = EventFactory.createArrayBacked(FabricBrewingRecipeRegistryBuilder.BuildCallback.class, listeners -> builder -> {
|
||||
for (FabricBrewingRecipeRegistryBuilder.BuildCallback listener : listeners) {
|
||||
listener.build(builder);
|
||||
}
|
||||
});
|
||||
|
||||
default void registerItemRecipe(class_1792 input, class_1856 ingredient, class_1792 output) {
|
||||
throw new AssertionError("Must be implemented via interface injection");
|
||||
}
|
||||
|
||||
default void registerPotionRecipe(class_6880<class_1842> input, class_1856 ingredient, class_6880<class_1842> output) {
|
||||
throw new AssertionError("Must be implemented via interface injection");
|
||||
}
|
||||
|
||||
default void registerRecipes(class_1856 ingredient, class_6880<class_1842> potion) {
|
||||
throw new AssertionError("Must be implemented via interface injection");
|
||||
}
|
||||
|
||||
default class_7699 getEnabledFeatures() {
|
||||
throw new AssertionError("Must be implemented via interface injection");
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this event to register custom brewing recipes.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
interface BuildCallback {
|
||||
/**
|
||||
* Called when the brewing recipe registry is being built.
|
||||
*
|
||||
* @param builder the {@link class_1845} instance
|
||||
*/
|
||||
void build(class_1845.class_9665 builder);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.neoforged.neoforge.common.brewing;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
|
||||
public class BrewingRecipe implements IBrewingRecipe {
|
||||
private final Ingredient input;
|
||||
private final Ingredient ingredient;
|
||||
private final ItemStack output;
|
||||
|
||||
public BrewingRecipe(Ingredient input, Ingredient ingredient, ItemStack output) {
|
||||
this.input = input;
|
||||
this.ingredient = ingredient;
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInput(ItemStack stack) {
|
||||
return this.input.test(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getOutput(ItemStack input, ItemStack ingredient) {
|
||||
return isInput(input) && isIngredient(ingredient) ? getOutput().copy() : ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
public Ingredient getInput() {
|
||||
return input;
|
||||
}
|
||||
|
||||
public Ingredient getIngredient() {
|
||||
return ingredient;
|
||||
}
|
||||
|
||||
public ItemStack getOutput() {
|
||||
return output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isIngredient(ItemStack ingredient) {
|
||||
return this.ingredient.test(ingredient);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) Forge Development LLC and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.neoforged.neoforge.common.brewing;
|
||||
|
||||
import static net.minecraft.world.item.alchemy.PotionBrewing.Builder;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.neoforged.neoforge.event.brewing.RegisterBrewingRecipesEvent;
|
||||
|
||||
/**
|
||||
* Interface for more flexible brewing recipes.
|
||||
*
|
||||
* <p>Register using {@link RegisterBrewingRecipesEvent} and {@link Builder#addRecipe(IBrewingRecipe)}.
|
||||
*/
|
||||
public interface IBrewingRecipe {
|
||||
/**
|
||||
* Returns true is the passed ItemStack is an input for this recipe. "Input"
|
||||
* being the item that goes in one of the three bottom slots of the brewing
|
||||
* stand (e.g: water bottle)
|
||||
*/
|
||||
boolean isInput(ItemStack input);
|
||||
|
||||
/**
|
||||
* Returns true if the passed ItemStack is an ingredient for this recipe.
|
||||
* "Ingredient" being the item that goes in the top slot of the brewing
|
||||
* stand (e.g: nether wart)
|
||||
*/
|
||||
boolean isIngredient(ItemStack ingredient);
|
||||
|
||||
/**
|
||||
* Returns the output when the passed input is brewed with the passed
|
||||
* ingredient. Empty if invalid input or ingredient.
|
||||
*/
|
||||
ItemStack getOutput(ItemStack input, ItemStack ingredient);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) NeoForged and contributors
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.neoforged.neoforge.event.brewing;
|
||||
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.world.item.alchemy.PotionBrewing;
|
||||
import net.neoforged.bus.api.Event;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Event to register new brewing recipes.
|
||||
*
|
||||
* <p>Fired on both client and server side, on the main event bus.
|
||||
*/
|
||||
public class RegisterBrewingRecipesEvent extends Event {
|
||||
private final PotionBrewing.Builder builder;
|
||||
private final RegistryAccess registryAccess;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public RegisterBrewingRecipesEvent(PotionBrewing.Builder builder, RegistryAccess registryAccess) {
|
||||
this.builder = builder;
|
||||
this.registryAccess = registryAccess;
|
||||
}
|
||||
|
||||
public PotionBrewing.Builder getBuilder() {
|
||||
return builder;
|
||||
}
|
||||
|
||||
public RegistryAccess getRegistryAccess() {
|
||||
return registryAccess;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user