2013-05-23 21:07:28 -07:00
|
|
|
package magicbees.client.model;
|
2013-05-06 00:24:06 -07:00
|
|
|
|
2013-05-23 21:07:28 -07:00
|
|
|
import magicbees.main.CommonProxy;
|
2023-01-29 10:24:49 -08:00
|
|
|
|
2013-08-25 19:56:55 -07:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2013-05-06 00:24:06 -07:00
|
|
|
import net.minecraftforge.client.model.AdvancedModelLoader;
|
|
|
|
|
import net.minecraftforge.client.model.IModelCustom;
|
2023-01-29 10:24:49 -08:00
|
|
|
|
2013-08-25 19:56:55 -07:00
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
|
|
2023-01-29 10:24:49 -08:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
2013-05-06 00:24:06 -07:00
|
|
|
@SideOnly(Side.CLIENT)
|
2022-10-12 21:09:45 +02:00
|
|
|
public class ModelEffectJar {
|
2023-01-29 10:24:49 -08:00
|
|
|
|
|
|
|
|
public static final ResourceLocation objFile = new ResourceLocation(
|
|
|
|
|
CommonProxy.DOMAIN,
|
|
|
|
|
CommonProxy.MODEL + "effectJar.obj");
|
|
|
|
|
public static final ResourceLocation textureLocation = new ResourceLocation(
|
|
|
|
|
CommonProxy.DOMAIN,
|
|
|
|
|
CommonProxy.MODEL + "jarTexture.png");
|
2022-10-12 21:09:45 +02:00
|
|
|
|
|
|
|
|
public static final ModelEffectJar model = new ModelEffectJar();
|
|
|
|
|
|
|
|
|
|
private IModelCustom effectJarObj;
|
|
|
|
|
|
|
|
|
|
public ModelEffectJar() {
|
|
|
|
|
this.effectJarObj = AdvancedModelLoader.loadModel(objFile);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void render() {
|
|
|
|
|
this.effectJarObj.renderPart("jarLid");
|
|
|
|
|
|
|
|
|
|
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
|
|
|
|
|
GL11.glEnable(GL11.GL_CULL_FACE);
|
|
|
|
|
GL11.glDisable(GL11.GL_LIGHTING);
|
|
|
|
|
GL11.glEnable(GL11.GL_BLEND);
|
|
|
|
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
|
|
|
|
this.effectJarObj.renderPart("jarBase");
|
|
|
|
|
GL11.glPopAttrib();
|
|
|
|
|
}
|
2013-05-06 00:24:06 -07:00
|
|
|
}
|