mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 11:19:19 +00:00
Staging changes would be a good idea. Also fix possible potion crash
This commit is contained in:
1 parent
4b7608fc2a
commit
b01e9dfed7
24 files changed
+4
-1
No files matched your search
@@ -28,6 +28,8 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
|
||||
import net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameData;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
@@ -141,7 +143,8 @@ public class ItemBloodPendant extends ItemBauble implements IBrewContainer, IBre
|
||||
|
||||
@Override
|
||||
public ItemStack getItemForBrew(Brew brew, ItemStack stack) {
|
||||
if(!brew.canInfuseBloodPendant() || brew.getPotionEffects(stack).size() != 1 || Potion.potionTypes[brew.getPotionEffects(stack).get(0).getPotionID()].isInstant())
|
||||
FMLControlledNamespacedRegistry<Potion> potionRegistry = GameData.getPotionRegistry();
|
||||
if(!brew.canInfuseBloodPendant() || brew.getPotionEffects(stack).size() != 1 || potionRegistry.getObjectById(brew.getPotionEffects(stack).get(0).getPotionID()).isInstant())
|
||||
return null;
|
||||
|
||||
ItemStack brewStack = new ItemStack(this);
|
||||
|
||||
Reference in new issue
Block a user