mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
shotty improvements, radar stuff, general polishing
This commit is contained in:
parent
bea57c26eb
commit
6934fed507
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.2 KiB |
@ -9,6 +9,10 @@ import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.interfaces.IBulletHurtBehavior;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -68,6 +72,29 @@ public class Gun12GaugeFactory {
|
||||
config.reloadSound = GunConfiguration.RSOUND_REVOLVER;
|
||||
config.firingSound = "hbm:weapon.shottyShoot";
|
||||
|
||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||
.addBus("SHOTTY_RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0.5, 0, 0, 50))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 50))
|
||||
)
|
||||
.addBus("SHOTTY_BREAK", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 100)) //do nothing for 100ms
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 60, 200)) //open
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 60, 500)) //do nothing for 500ms
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200)) //close
|
||||
)
|
||||
.addBus("SHOTTY_EJECT", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 300)) //do nothing for 300ms
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 700)) //fling!
|
||||
)
|
||||
.addBus("SHOTTY_INSERT", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 300)) //do nothing for 300ms
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 1, 0)) //reposition
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 350)) //come in from the side
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 150)) //push
|
||||
)
|
||||
);
|
||||
|
||||
config.name = "???";
|
||||
config.manufacturer = "???";
|
||||
config.comment.add("but bOB WhY iS TExtURE no woRk");
|
||||
|
||||
@ -3299,15 +3299,15 @@ public class ModItems {
|
||||
battery_spark_cell_10000 = new ItemBattery(100000000L * 10000L, 200000000, 200000000).setUnlocalizedName("battery_spark_cell_10000").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_10000");
|
||||
battery_spark_cell_power = new ItemBattery(100000000L * 1000000L, 200000000, 200000000).setUnlocalizedName("battery_spark_cell_power").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_spark_cell_power");
|
||||
|
||||
battery_potato = new ItemBattery(1, 0, 1).setUnlocalizedName("battery_potato").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potato");
|
||||
battery_potatos = new ItemPotatos(50, 0, 1).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos");
|
||||
battery_su = new ItemBattery(15, 0, 1).setUnlocalizedName("battery_su").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su");
|
||||
battery_su_l = new ItemBattery(35, 0, 1).setUnlocalizedName("battery_su_l").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su_l");
|
||||
battery_steam = new ItemBattery(600, 3, 60).setUnlocalizedName("battery_steam").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_steam");
|
||||
battery_steam_large = new ItemBattery(1000, 5, 100).setUnlocalizedName("battery_steam_large").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_steam_large");
|
||||
fusion_core = new ItemBattery(200000, 0, 25).setUnlocalizedName("fusion_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_core");
|
||||
battery_potato = new ItemBattery(100, 0, 100).setUnlocalizedName("battery_potato").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potato");
|
||||
battery_potatos = new ItemPotatos(5000, 0, 100).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos");
|
||||
battery_su = new ItemBattery(1500, 0, 100).setUnlocalizedName("battery_su").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su");
|
||||
battery_su_l = new ItemBattery(3500, 0, 100).setUnlocalizedName("battery_su_l").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su_l");
|
||||
battery_steam = new ItemBattery(60000, 300, 6000).setUnlocalizedName("battery_steam").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_steam");
|
||||
battery_steam_large = new ItemBattery(100000, 500, 10000).setUnlocalizedName("battery_steam_large").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_steam_large");
|
||||
fusion_core = new ItemBattery(20000000, 0, 2500).setUnlocalizedName("fusion_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_core");
|
||||
fusion_core_infinite = new Item().setUnlocalizedName("fusion_core_infinite").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_core_infinite");
|
||||
energy_core = new ItemBattery(100000, 0, 10).setUnlocalizedName("energy_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":energy_core");
|
||||
energy_core = new ItemBattery(10000000, 0, 1000).setUnlocalizedName("energy_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":energy_core");
|
||||
fuse = new ItemCustomLore().setUnlocalizedName("fuse").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fuse");
|
||||
redcoil_capacitor = new ItemCapacitor(10).setUnlocalizedName("redcoil_capacitor").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":redcoil_capacitor");
|
||||
titanium_filter = new ItemCapacitor(72000).setUnlocalizedName("titanium_filter").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":titanium_filter");
|
||||
|
||||
@ -53,7 +53,7 @@ public class ItemDiscord extends Item {
|
||||
list.add(EnumChatFormatting.RED + "" + EnumChatFormatting.ITALIC + "Rod of Discord is crucial in so many boss fights.");
|
||||
list.add(EnumChatFormatting.RED + "" + EnumChatFormatting.ITALIC + "Imagine getting coiled by worm bosses.");
|
||||
list.add("");
|
||||
list.add(EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "Oh, you mean the terraria item.");
|
||||
list.add(EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "Oh, you mean the Terraria item.");
|
||||
list.add(EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "Idk about that thing.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_brimstone, new ItemRenderObj());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_hk69, new ItemRenderWeaponObj());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_deagle, new ItemRenderWeaponObj());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_supershotgun, new ItemRenderWeaponObj());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_supershotgun, new ItemRenderWeaponShotty());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_ks23, new ItemRenderWeaponObj());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flamer, new ItemRenderWeaponObj());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flechette, new ItemRenderWeaponObj());
|
||||
|
||||
@ -50,9 +50,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
if(item.getItem() == ModItems.gun_deagle)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.turbofan_blades_tex);
|
||||
|
||||
if(item.getItem() == ModItems.gun_supershotgun)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.turbofan_blades_tex);
|
||||
|
||||
if(item.getItem() == ModItems.gun_ks23)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ks23_tex);
|
||||
|
||||
@ -93,17 +90,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_supershotgun) {
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.2F, -0.3F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
|
||||
if(player.isSneaking()) {
|
||||
GL11.glTranslatef(0F, 0.25F, -0.555F);
|
||||
GL11.glRotatef(-5F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_ks23) {
|
||||
GL11.glTranslatef(1.0F, 0.85F, -0.25F);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
@ -183,13 +169,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
GL11.glScaled(0.15, 0.15, 0.15);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_supershotgun) {
|
||||
GL11.glRotatef(20F, 1.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-80F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.3F, -0.5F);
|
||||
GL11.glScaled(1.5, 1.5, 1.5);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_ks23) {
|
||||
GL11.glRotatef(20F, 1.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(10F, 0.0F, 1.0F, 0.0F);
|
||||
@ -233,10 +212,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScaled(0.25, 0.25, 0.25);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_supershotgun) {
|
||||
GL11.glTranslatef(-1.0F, -0.2F, 0.0F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_ks23) {
|
||||
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
|
||||
@ -331,12 +306,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_supershotgun) {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.shotty.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_ks23) {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.ks23.renderAll();
|
||||
|
||||
@ -0,0 +1,118 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderWeaponShotty implements IItemRenderer {
|
||||
|
||||
public ItemRenderWeaponShotty() { }
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return false;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
|
||||
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.universal);
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("SHOTTY_RECOIL");
|
||||
double[] eject = HbmAnimations.getRelevantTransformation("SHOTTY_BREAK");
|
||||
double[] ejectShell = HbmAnimations.getRelevantTransformation("SHOTTY_EJECT");
|
||||
double[] insertShell = HbmAnimations.getRelevantTransformation("SHOTTY_INSERT");
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-10F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(1.75F, -0.2F, -0.3F);
|
||||
|
||||
if(player.isSneaking()) {
|
||||
GL11.glTranslatef(0F, 1.0F, -1.8F);
|
||||
GL11.glRotatef(3.5F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
GL11.glTranslated(-recoil[0] * 2, 0, 0);
|
||||
GL11.glRotated(recoil[0] * 5, 0, 0, 1);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(-eject[2], 0, 0, 1);
|
||||
ResourceManager.shotty.renderPart("Barrel");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(ejectShell[0] * 90, 0, 0, 1);
|
||||
GL11.glTranslated(-ejectShell[0] * 10, 0, 0);
|
||||
ResourceManager.shotty.renderPart("Shells");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-insertShell[0], insertShell[2] * -2, insertShell[2] * -1);
|
||||
ResourceManager.shotty.renderPart("Shells");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
ResourceManager.shotty.renderPart("Handle");
|
||||
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
GL11.glRotatef(-80F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-10F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(10F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(5F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.5F, 0.0F, -0.4F);
|
||||
GL11.glScaled(0.35, 0.35, 0.35);
|
||||
ResourceManager.shotty.renderPart("Handle");
|
||||
ResourceManager.shotty.renderPart("Barrel");
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glTranslatef(-1.0F, 0.2F, 0.0F);
|
||||
ResourceManager.shotty.renderPart("Handle");
|
||||
ResourceManager.shotty.renderPart("Barrel");
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -3,20 +3,13 @@ package com.hbm.tileentity.machine;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.missile.EntityMissileAntiBallistic;
|
||||
import com.hbm.entity.missile.EntityMissileBaseAdvanced;
|
||||
import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.Untested;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TERadarDestructorPacket;
|
||||
import com.hbm.packet.TERadarPacket;
|
||||
import com.hbm.tileentity.TileEntityTickingBase;
|
||||
|
||||
import api.hbm.energy.IRadarDetectable;
|
||||
import api.hbm.energy.IRadarDetectable.RadarTargetType;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user