mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 06:53:20 +00:00
Update furnace fuels to not recreate it's list every query, and update when tags are reloaded. Add Tag update events. (#6140)
This commit is contained in:
1 parent
bb83e11a7c
commit
79ce18ac3e
8 files changed
+138
-18
No files matched your search
@@ -64,6 +64,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.fluid.IFluidState;
|
||||
import net.minecraft.inventory.EquipmentSlotType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.RecipeManager;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
@@ -997,9 +998,9 @@ public class ForgeHooksClient
|
||||
return MinecraftForge.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
public static void onRecipesUpdated()
|
||||
public static void onRecipesUpdated(RecipeManager mgr)
|
||||
{
|
||||
Event event = new RecipesUpdatedEvent();
|
||||
Event event = new RecipesUpdatedEvent(mgr);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,19 @@ import net.minecraftforge.eventbus.api.Event;
|
||||
*/
|
||||
public class RecipesUpdatedEvent extends Event
|
||||
{
|
||||
public RecipesUpdatedEvent()
|
||||
|
||||
private final RecipeManager mgr;
|
||||
|
||||
public RecipesUpdatedEvent(RecipeManager mgr)
|
||||
{
|
||||
this.mgr = mgr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The newly-updated recipe manager that now contains all the recipes that were just received.
|
||||
*/
|
||||
public RecipeManager getRecipeManager()
|
||||
{
|
||||
return mgr;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user