mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Add shouldRender() to Potions that allows to hide them completely in the inventory
This commit is contained in:
1 parent
30bc2653c5
commit
2324c2fd20
3 files changed
+60
-2
No files matched your search
@@ -0,0 +1,29 @@
|
||||
package net.minecraftforge.debug;
|
||||
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
@Mod( modid = NoPotionEffectRenderTest.modID, name = "No Potion Effect Render Test", version = "0.0.0" )
|
||||
public class NoPotionEffectRenderTest {
|
||||
public static final String modID = "nopotioneffect";
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
TestPotion INSTANCE = new TestPotion(30, new ResourceLocation(modID, "test_potion"), false, 0xff00ff);
|
||||
}
|
||||
|
||||
public static class TestPotion extends Potion {
|
||||
|
||||
public TestPotion(int potionID, ResourceLocation location, boolean badEffect, int potionColor) {
|
||||
super(potionID, location, badEffect, potionColor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender(PotionEffect effect) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user