more cluttery garbage
7320
src/main/java/assets/hbm/models/soyuz_module.obj
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 831 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 100 B After Width: | Height: | Size: 100 B |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
@ -3,6 +3,7 @@ package com.hbm.main;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.mob.EntityHunterChopper;
|
||||
@ -25,6 +26,7 @@ import com.hbm.render.anim.HbmAnimations;
|
||||
import com.hbm.render.anim.HbmAnimations.Animation;
|
||||
import com.hbm.render.util.RenderAccessoryUtility;
|
||||
import com.hbm.render.util.RenderScreenOverlay;
|
||||
import com.hbm.render.util.SoyuzPronter;
|
||||
import com.hbm.sound.MovingSoundChopper;
|
||||
import com.hbm.sound.MovingSoundChopperMine;
|
||||
import com.hbm.sound.MovingSoundCrashing;
|
||||
@ -37,9 +39,13 @@ import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
|
||||
import com.hbm.sound.MovingSoundPlayerLoop.EnumHbmSound;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -47,10 +53,13 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.MouseEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.client.event.sound.PlaySoundEvent17;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
@ -287,4 +296,41 @@ public class ModEventHandlerClient {
|
||||
if(event.map.getTextureType() == 0)
|
||||
particleBase = event.map.registerIcon(RefStrings.MODID + ":particle/particle_base");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onRenderWorldLastEvent(RenderWorldLastEvent event) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
double dx = player.prevPosX + (player.posX - player.prevPosX) * event.partialTicks;
|
||||
double dy = player.prevPosY + (player.posY - player.prevPosY) * event.partialTicks;
|
||||
double dz = player.prevPosZ + (player.posZ - player.prevPosZ) * event.partialTicks;
|
||||
|
||||
int dist = 300;
|
||||
int x = 0;
|
||||
int y = 500;
|
||||
int z = 0;
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(x - dx, y - dy, z - dz);
|
||||
|
||||
if(vec.lengthVector() < dist) {
|
||||
|
||||
GL11.glTranslated(vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
|
||||
GL11.glRotated(80, 0, 0, 1);
|
||||
GL11.glRotated(30, 0, 1, 0);
|
||||
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 6500F, 30F);
|
||||
SoyuzPronter.prontCapsule();
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@ -448,6 +448,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom minerRocket = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/minerRocket.obj"));
|
||||
public static final IModelCustom soyuz = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/soyuz.obj"));
|
||||
public static final IModelCustom soyuz_lander = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/soyuz_lander.obj"));
|
||||
public static final IModelCustom soyuz_module = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/soyuz_module.obj"));
|
||||
public static final IModelCustom soyuz_launcher_legs = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/launch_table/soyuz_launcher_legs.obj"));
|
||||
public static final IModelCustom soyuz_launcher_table = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/launch_table/soyuz_launcher_table.obj"));
|
||||
public static final IModelCustom soyuz_launcher_tower_base = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/launch_table/soyuz_launcher_tower_base.obj"));
|
||||
@ -610,9 +611,14 @@ public class ResourceManager {
|
||||
public static final ResourceLocation soyuz_authentic_boosterside = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_authentic/boosterside.png");
|
||||
public static final ResourceLocation soyuz_memento = new ResourceLocation(RefStrings.MODID, "textures/items/polaroid_memento.png");
|
||||
|
||||
public static final ResourceLocation soyuz_lander_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_lander.png");
|
||||
public static final ResourceLocation soyuz_lander_rust_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_lander_rust.png");
|
||||
public static final ResourceLocation soyuz_chute_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_chute.png");
|
||||
public static final ResourceLocation soyuz_lander_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/soyuz_lander.png");
|
||||
public static final ResourceLocation soyuz_lander_rust_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/soyuz_lander_rust.png");
|
||||
public static final ResourceLocation soyuz_chute_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/soyuz_chute.png");
|
||||
|
||||
public static final ResourceLocation soyuz_module_dome_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/module_dome.png");
|
||||
public static final ResourceLocation soyuz_module_lander_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/module_lander.png");
|
||||
public static final ResourceLocation soyuz_module_propulsion_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/module_propulsion.png");
|
||||
public static final ResourceLocation soyuz_module_solar_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/module_solar.png");
|
||||
|
||||
public static final ResourceLocation soyuz_launcher_legs_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_launcher/launcher_leg.png");
|
||||
public static final ResourceLocation soyuz_launcher_table_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_launcher/launcher_table.png");
|
||||
|
||||
@ -137,7 +137,7 @@ public class RendererObjTester extends TileEntitySpecialRenderer {
|
||||
ResourceManager.soyuz_lander.renderPart("Chute");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);*/
|
||||
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
/*GL11.glRotatef(-90, 0, 1, 0);
|
||||
GL11.glTranslated(0, 3, 0);
|
||||
bindTexture(ResourceManager.nikonium_tex);
|
||||
ResourceManager.nikonium.renderAll();
|
||||
@ -163,6 +163,22 @@ public class RendererObjTester extends TileEntitySpecialRenderer {
|
||||
font.drawString("00:15", 0, 0, 0xff0000);
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);*/
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
bindTexture(ResourceManager.soyuz_module_dome_tex);
|
||||
ResourceManager.soyuz_module.renderPart("Dome");
|
||||
bindTexture(ResourceManager.soyuz_module_lander_tex);
|
||||
ResourceManager.soyuz_module.renderPart("Capsule");
|
||||
bindTexture(ResourceManager.soyuz_module_propulsion_tex);
|
||||
ResourceManager.soyuz_module.renderPart("Propulsion");
|
||||
bindTexture(ResourceManager.soyuz_module_solar_tex);
|
||||
ResourceManager.soyuz_module.renderPart("Solar");
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@ -175,5 +176,29 @@ public class SoyuzPronter {
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public static void prontCapsule() {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
TextureManager tex = Minecraft.getMinecraft().getTextureManager();
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_module_dome_tex);
|
||||
ResourceManager.soyuz_module.renderPart("Dome");
|
||||
tex.bindTexture(ResourceManager.soyuz_module_lander_tex);
|
||||
ResourceManager.soyuz_module.renderPart("Capsule");
|
||||
tex.bindTexture(ResourceManager.soyuz_module_propulsion_tex);
|
||||
ResourceManager.soyuz_module.renderPart("Propulsion");
|
||||
tex.bindTexture(ResourceManager.soyuz_module_solar_tex);
|
||||
ResourceManager.soyuz_module.renderPart("Solar");
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||