2015-10-18 21:40:52 +02:00
|
|
|
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;
|
2016-03-09 14:11:56 -08:00
|
|
|
import net.minecraftforge.fml.common.registry.GameData;
|
2015-10-18 21:40:52 +02:00
|
|
|
|
2016-11-22 12:12:13 -08:00
|
|
|
@Mod( modid = NoPotionEffectRenderTest.modID, name = "No Potion Effect Render Test", version = "0.0.0", acceptableRemoteVersions = "*" )
|
2015-10-18 21:40:52 +02:00
|
|
|
public class NoPotionEffectRenderTest {
|
|
|
|
|
public static final String modID = "nopotioneffect";
|
|
|
|
|
|
|
|
|
|
@Mod.EventHandler
|
|
|
|
|
public void preInit(FMLPreInitializationEvent event) {
|
2016-03-09 14:11:56 -08:00
|
|
|
TestPotion INSTANCE = new TestPotion(new ResourceLocation(modID, "test_potion"), false, 0xff00ff);
|
|
|
|
|
GameData.getPotionRegistry().register(-1, new ResourceLocation(modID, "test_potion"), INSTANCE);
|
2015-10-18 21:40:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class TestPotion extends Potion {
|
|
|
|
|
|
2016-03-09 14:11:56 -08:00
|
|
|
public TestPotion(ResourceLocation location, boolean badEffect, int potionColor) {
|
|
|
|
|
super(badEffect, potionColor);
|
2015-10-18 21:40:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean shouldRender(PotionEffect effect) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|