mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-24 14:04:34 +00:00
Move mana infusion to json
This commit is contained in:
1 parent
80dc95684e
commit
7ff539c5cd
143 files changed
+2020
-423
No files matched your search
@@ -22,7 +22,6 @@ import net.minecraftforge.fml.network.PacketDistributor;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.recipe.RecipeBrew;
|
||||
import vazkii.botania.api.recipe.RecipeElvenTrade;
|
||||
import vazkii.botania.api.recipe.RecipeManaInfusion;
|
||||
import vazkii.botania.api.recipe.RecipePetals;
|
||||
import vazkii.botania.api.recipe.RecipePureDaisy;
|
||||
@@ -43,22 +42,19 @@ public class SyncHandler {
|
||||
@Override
|
||||
public void onResourceManagerReload(@Nullable IResourceManager manager) {
|
||||
Map<ResourceLocation, RecipePureDaisy> pureDaisy = new HashMap<>();
|
||||
Map<ResourceLocation, RecipeManaInfusion> manaInfusion = new HashMap<>();
|
||||
Map<ResourceLocation, RecipeBrew> brew = new HashMap<>();
|
||||
Map<ResourceLocation, RecipePetals> apothecary = new HashMap<>();
|
||||
Map<ResourceLocation, RecipeRuneAltar> runeAltar = new HashMap<>();
|
||||
|
||||
RegisterRecipesEvent evt = new RegisterRecipesEvent(
|
||||
r -> pureDaisy.put(r.getId(), r),
|
||||
r -> manaInfusion.put(r.getId(), r),
|
||||
r -> brew.put(r.getId(), r),
|
||||
r -> brew.put(r.getId(), r),
|
||||
r -> apothecary.put(r.getId(), r),
|
||||
r -> runeAltar.put(r.getId(), r)
|
||||
);
|
||||
MinecraftForge.EVENT_BUS.post(evt);
|
||||
|
||||
BotaniaAPI.pureDaisyRecipes = ImmutableMap.copyOf(pureDaisy);
|
||||
BotaniaAPI.manaInfusionRecipes = ImmutableMap.copyOf(manaInfusion);
|
||||
BotaniaAPI.brewRecipes = ImmutableMap.copyOf(brew);
|
||||
BotaniaAPI.petalRecipes = ImmutableMap.copyOf(apothecary);
|
||||
BotaniaAPI.runeAltarRecipes = ImmutableMap.copyOf(runeAltar);
|
||||
@@ -67,8 +63,8 @@ public class SyncHandler {
|
||||
}
|
||||
|
||||
private static PacketSyncRecipes syncPacket() {
|
||||
return new PacketSyncRecipes(BotaniaAPI.brewRecipes, BotaniaAPI.manaInfusionRecipes,
|
||||
BotaniaAPI.petalRecipes, BotaniaAPI.pureDaisyRecipes, BotaniaAPI.runeAltarRecipes);
|
||||
return new PacketSyncRecipes(BotaniaAPI.brewRecipes,
|
||||
BotaniaAPI.petalRecipes, BotaniaAPI.pureDaisyRecipes, BotaniaAPI.runeAltarRecipes);
|
||||
}
|
||||
|
||||
@Mod.EventBusSubscriber(modid = LibMisc.MOD_ID, value = Dist.CLIENT)
|
||||
@@ -76,7 +72,6 @@ public class SyncHandler {
|
||||
@SubscribeEvent
|
||||
public static void clientLogout(ClientPlayerNetworkEvent.LoggedOutEvent evt) {
|
||||
BotaniaAPI.brewRecipes = Collections.emptyMap();
|
||||
BotaniaAPI.manaInfusionRecipes = Collections.emptyMap();
|
||||
BotaniaAPI.petalRecipes = Collections.emptyMap();
|
||||
BotaniaAPI.pureDaisyRecipes = Collections.emptyMap();
|
||||
BotaniaAPI.runeAltarRecipes = Collections.emptyMap();
|
||||
|
||||
Reference in new issue
Block a user