forked from MobiusFlip/CrimsonRevelations
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add effect list config option for mana beans
Also nerf instant effects
- Loading branch information
1 parent
fcb4196
commit 551bacc
Showing
5 changed files
with
85 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/mod/icarus/crimsonrevelations/config/CRConfigLists.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package mod.icarus.crimsonrevelations.config; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import net.minecraft.potion.Potion; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraftforge.fml.common.registry.ForgeRegistries; | ||
|
||
public class CRConfigLists { | ||
public static List<Potion> manaBeanEffects = new ArrayList<>(); | ||
|
||
public static void initLists() { | ||
manaBeanEffects.clear(); | ||
|
||
try { | ||
for (String entry : CRConfig.general_settings.MANA_BEAN_EFFECT_LIST) { | ||
ResourceLocation resLoc = new ResourceLocation(entry); | ||
|
||
if (ForgeRegistries.POTIONS.containsKey(resLoc)) { | ||
manaBeanEffects.add(ForgeRegistries.POTIONS.getValue(resLoc)); | ||
} | ||
} | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters