added solinium bomb and changed the rendering because it was fucked up
This commit is contained in:
LegendaryDoge30 2025-05-12 13:30:12 +02:00
parent be84b21867
commit 273590a96b
6 changed files with 1473 additions and 612 deletions

View File

@ -274,7 +274,7 @@ public class ResourceManager {
public static final IModelCustom bomb_tsar = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/tsar.obj")).asVBO();
public static final IModelCustom bomb_prototype = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/Prototype.obj")).asVBO();
public static final IModelCustom bomb_fleija = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/fleija.obj")).asVBO();
public static final IModelCustom bomb_solinium = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/bombs/ufp.obj"));
public static final IModelCustom bomb_solinium = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/ufp.obj")).asVBO();
public static final IModelCustom n2 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/bombs/n2.obj"));
public static final IModelCustom bomb_multi = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/BombGeneric.obj"));
public static final IModelCustom fstbmb = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/fstbmb.obj")).asVBO();

View File

@ -363,29 +363,6 @@ public class ItemRenderLibrary {
ResourceManager.bomb_boy.renderAll();
}});
renderers.put(Item.getItemFromBlock(ModBlocks.nuke_prototype), new ItemRenderBase() {
public void renderInventory() {
GL11.glScaled(2.25, 2.25, 2.25);
}
public void renderCommon() {
GL11.glRotated(90, 0, 1, 0);
bindTexture(ResourceManager.bomb_prototype_tex);
ResourceManager.bomb_prototype.renderAll();
}});
renderers.put(Item.getItemFromBlock(ModBlocks.nuke_solinium), new ItemRenderBase() {
public void renderInventory() {
GL11.glScaled(4, 4, 4);
}
public void renderCommon() {
GL11.glTranslated(0.5, 0, 0);
GL11.glRotated(90, 0, 1, 0);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.bomb_solinium_tex);
ResourceManager.bomb_solinium.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.nuke_n2), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -4, 0);

View File

@ -1,5 +1,9 @@
package com.hbm.render.tileentity;
import com.hbm.blocks.ModBlocks;
import com.hbm.render.item.ItemRenderBase;
import net.minecraft.item.Item;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
@ -7,7 +11,7 @@ import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
public class RenderNukePrototype extends TileEntitySpecialRenderer {
public class RenderNukePrototype extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
@ -36,5 +40,30 @@ public class RenderNukePrototype extends TileEntitySpecialRenderer {
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.nuke_prototype);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, 0.125, 0);
GL11.glScaled(3, 3, 3);
}
public void renderCommon() {
GL11.glRotated(90, 0, 1, 0);
GL11.glTranslated(0, 0.125, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.bomb_prototype_tex);
ResourceManager.bomb_prototype.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_FLAT);
}
};
}
}

View File

@ -1,5 +1,9 @@
package com.hbm.render.tileentity;
import com.hbm.blocks.ModBlocks;
import com.hbm.render.item.ItemRenderBase;
import net.minecraft.item.Item;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
@ -7,8 +11,8 @@ import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
public class RenderNukeSolinium extends TileEntitySpecialRenderer {
public class RenderNukeSolinium extends TileEntitySpecialRenderer implements IItemRendererProvider {
public RenderNukeSolinium() { }
@Override
@ -18,9 +22,9 @@ public class RenderNukeSolinium extends TileEntitySpecialRenderer {
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glRotatef(90, 0F, 1F, 0F);
switch(tileEntity.getBlockMetadata())
{
case 2:
@ -32,12 +36,39 @@ public class RenderNukeSolinium extends TileEntitySpecialRenderer {
case 5:
GL11.glRotatef(0, 0F, 1F, 0F); break;
}
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.bomb_solinium_tex);
ResourceManager.bomb_solinium.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.nuke_solinium);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -0.125, 0);
GL11.glScaled(5, 5, 5);
}
public void renderCommon() {
GL11.glRotated(90, 0, 1, 0);
GL11.glTranslated(0, -0.125, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.bomb_solinium_tex);
ResourceManager.bomb_solinium.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_FLAT);
}
};
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB