mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Initial animation work for the Novac
This commit is contained in:
parent
60de291033
commit
a2e487912c
@ -15,12 +15,14 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo44Magnum;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
@ -60,6 +62,11 @@ public class Gun44MagnumFactory {
|
||||
config.config.addAll(HbmCollection.m44Normal);
|
||||
|
||||
config.ejector = EJECTOR_PIP;
|
||||
|
||||
config.loadAnimations = i -> {
|
||||
config.animations.put(AnimType.CYCLE, ResourceManager.novac_anim.get("Fire"));
|
||||
config.animations.put(AnimType.RELOAD, ResourceManager.novac_anim.get("Reload"));
|
||||
};
|
||||
|
||||
return config;
|
||||
}
|
||||
@ -220,7 +227,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true);
|
||||
eff.getCurativeItems().clear();
|
||||
bullet.effects = new ArrayList();
|
||||
bullet.effects = new ArrayList<PotionEffect>();
|
||||
bullet.effects.add(new PotionEffect(eff));
|
||||
|
||||
bullet.bntImpact = (bulletnt, x, y, z, sideHit) -> {
|
||||
|
||||
@ -834,7 +834,6 @@ public class ResourceManager {
|
||||
public static final IModelCustom bio_revolver = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/bio_revolver.obj"));
|
||||
public static final IModelCustom chemthrower = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/chemthrower.obj")).asDisplayList();
|
||||
public static final IModelCustom novac = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/novac.obj"));
|
||||
public static final IModelCustom novac_scoped = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/novac_scoped.obj"));
|
||||
public static final IModelCustom m2 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/m2_browning.obj")).asDisplayList(); //large fella should be a display list
|
||||
public static final IModelCustom lunatic_sniper = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lunatic_sniper.obj")).asDisplayList();
|
||||
public static final IModelCustom tau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/tau.obj"));
|
||||
@ -847,6 +846,7 @@ public class ResourceManager {
|
||||
|
||||
public static final HashMap<String, BusAnimation> python_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/python.json"));
|
||||
public static final HashMap<String, BusAnimation> cursed_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/cursed.json"));
|
||||
public static final HashMap<String, BusAnimation> novac_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/novac.json"));
|
||||
|
||||
public static final IModelCustom lance = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lance.obj"));
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -58,8 +59,37 @@ public class ItemRenderWeaponNovac implements IItemRenderer {
|
||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.0F, 0.0F, -1.25F);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Body");
|
||||
ResourceManager.novac.renderPart("Body");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
HbmAnimations.applyRelevantTransformation("Cylinder");
|
||||
ResourceManager.novac.renderPart("Cylinder");
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
HbmAnimations.applyRelevantTransformation("Hammer");
|
||||
ResourceManager.novac.renderPart("Hammer");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
HbmAnimations.applyRelevantTransformation("Trigger");
|
||||
ResourceManager.novac.renderPart("Trigger");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if (item.getItem() == ModItems.gun_revolver_pip) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.novac_scope_tex);
|
||||
ResourceManager.novac.renderPart("Scope");
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
break;
|
||||
GL11.glPopMatrix();
|
||||
|
||||
return;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
@ -97,15 +127,13 @@ public class ItemRenderWeaponNovac implements IItemRenderer {
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.novac.renderAllExcept("Scope");
|
||||
|
||||
if(item.getItem() == ModItems.gun_revolver_pip) {
|
||||
ResourceManager.novac_scoped.renderPart("Gun");
|
||||
ResourceManager.novac_scoped.renderPart("Hammer");
|
||||
ResourceManager.novac_scoped.renderPart("Cylinder");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.novac_scope_tex);
|
||||
ResourceManager.novac_scoped.renderPart("Scope");
|
||||
} else {
|
||||
ResourceManager.novac.renderAll();
|
||||
ResourceManager.novac.renderPart("Scope");
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -0,0 +1 @@
|
||||
{"Fire": {"Body": {"rotation_euler": {"x": [[0.0, 0.0], [29.145301697941925, 83.33333333333333], [0.0, 200.0]]}, "location": {"z": [[-0.0, 0.0], [0.7235583066940308, 50.0], [-0.0, 233.33333333333331]], "y": [[0.0, 0.0], [0.7866886854171753, 50.0], [0.0, 233.33333333333331]]}}, "Hammer": {"rotation_euler": {"x": [[0.0, 0.0], [-42.84400081430579, 16.666666666666668], [-42.84400081430579, 250.00000000000003], [0.0, 200.0]]}, "location": {"x": [[0.0, 0.0]], "z": [[1.1140995025634766, 0.0]], "y": [[0.48292604088783264, 0.0]]}}}, "Reload": {"Body": {"location": {"x": [[0.0, 0.0], [0.04879806935787201, 166.66666666666666], [-0.1566363126039505, 133.33333333333334], [0.0, 166.66666666666669]], "z": [[-0.0, 0.0], [-0.7191624641418457, 166.66666666666666], [-1.058491826057434, 133.33333333333334], [-0.0, 166.66666666666669]], "y": [[0.0, 0.0], [0.7507638931274414, 166.66666666666666], [0.9907249212265015, 133.33333333333334], [0.0, 166.66666666666669]]}, "rotation_euler": {"x": [[0.0, 0.0], [-19.391663497116777, 166.66666666666666], [45.102665825653546, 133.33333333333334], [0.0, 166.66666666666669]], "z": [[-0.0, 0.0], [0.5174686318159474, 166.66666666666666], [3.009666081818643, 133.33333333333334], [-0.0, 166.66666666666669]], "y": [[-0.0, 0.0], [1.4431158784559095, 166.66666666666666], [-0.8437833740125396, 133.33333333333334], [0.0, 166.66666666666669]]}}}}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user