mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge branch 'HbmMods:master' into master
This commit is contained in:
commit
cca5300deb
24
changelog
24
changelog
@ -1,13 +1,29 @@
|
||||
## Changed
|
||||
* Any bullet that can ricochet (or at least runs the code for it) can now also break glass
|
||||
* Removed the witch taunter achievement for being unobtainable now
|
||||
* Removed three old achievements which no longer work due to the gun changes
|
||||
* AJR armor plating now uses niobium instead of saturnite, and yields twice as many items per recipe
|
||||
* Due to the gating change, the saturnite anvil now has a tier equivalent to a bronze anvil
|
||||
* Doubled the liberator's base damage to be on-par with the lever action shotgun in order to offset its poor performance due to the reload speed
|
||||
* All non black powder shotgun shells now have some amount of damage threshold negation in order to not immediately become useless when used against early power armor
|
||||
* Obviously shot will always fare worse against higher tier armor, in those cases either use flechettes, slugs, any of the high tier rounds or a different caliber entirely
|
||||
* Bombers and cargo planes now use interpolation, making their movement smoother and fixing potential desyncs due to TPS
|
||||
* Trenchmaster armor no longer displays benefits that no longer exist
|
||||
|
||||
## Fixed
|
||||
* Fixed 9mm soft points being called ".9mm"
|
||||
* Fixed missing localization for the hard plastic autogen material
|
||||
* Fixed missing localization for the hard plastic and PVC autogen materials
|
||||
* Fixed the fat mine's crafting recipe still using the deprecated ammo item
|
||||
* Removed legacy ammo items from all remaining item pools
|
||||
* Removed legacy ammo items and guns from all remaining item pools
|
||||
* Fixed the rubber grip not having a recipe
|
||||
* Fixed the coilgun and bolter not being classified correctly
|
||||
* Fixed the coilgun and bolter not being classified correctly
|
||||
* Fixed new death messages not working
|
||||
* Fixed none of the armors having fall resistance
|
||||
* Fixed survey scanners not picking up nether depth rock
|
||||
* Fixed FMJ, AP and DU rounds not having damage threshold negation, making them worse against most armored targets compared to JHP
|
||||
* Fixed autgen items made from unsmeltable materials being smeltable in the crucible
|
||||
* Fixed 240mm shells not being visible in creative
|
||||
* Fixed JHP's negative armor piercing value not being counted right, breaking the "armor is worth more" system
|
||||
* Fixed the second UZI dealing more damage than it should
|
||||
* Potentially fixed an issue where artillery rockets would sometimes get stuck mid-air
|
||||
* Fixed the artillery rocket turret's grace range not being 250 as advertised
|
||||
* Fixed black powder shotshells using smokeless powder instead of smokeful powder
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=5091
|
||||
mod_build_number=5180
|
||||
|
||||
credits=HbMinecraft,\
|
||||
\ rodolphito (explosion algorithms),\
|
||||
|
||||
@ -1112,9 +1112,6 @@ public class ModBlocks {
|
||||
public static Block rail_large_switch;
|
||||
public static Block rail_large_switch_flipped;
|
||||
|
||||
public static Block statue_elb;
|
||||
public static Block statue_elb_g;
|
||||
public static Block statue_elb_w;
|
||||
public static Block statue_elb_f;
|
||||
|
||||
public static Block cheater_virus;
|
||||
@ -2273,9 +2270,6 @@ public class ModBlocks {
|
||||
volcano_core = new BlockVolcano().setBlockName("volcano_core").setBlockUnbreakable().setResistance(10000.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":volcano_core");
|
||||
volcano_rad_core = new BlockVolcano().setBlockName("volcano_rad_core").setBlockUnbreakable().setResistance(10000.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":volcano_rad_core");
|
||||
|
||||
statue_elb = new DecoBlockAlt(Material.iron).setBlockName("#null").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
statue_elb_g = new DecoBlockAlt(Material.iron).setBlockName("#void").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
statue_elb_w = new DecoBlockAlt(Material.iron).setBlockName("#ngtv").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
statue_elb_f = new DecoBlockAlt(Material.iron).setBlockName("#undef").setHardness(Float.POSITIVE_INFINITY).setLightLevel(1.0F).setResistance(Float.POSITIVE_INFINITY);
|
||||
|
||||
mud_fluid = new MudFluid().setDensity(2500).setViscosity(3000).setLuminosity(5).setTemperature(2773).setUnlocalizedName("mud_fluid");
|
||||
@ -3386,9 +3380,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(crate_jungle, crate_jungle.getUnlocalizedName());
|
||||
|
||||
//ElB
|
||||
GameRegistry.registerBlock(statue_elb, statue_elb.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(statue_elb_g, statue_elb_g.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(statue_elb_w, statue_elb_w.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(statue_elb_f, statue_elb_f.getUnlocalizedName());
|
||||
|
||||
//Fluids
|
||||
|
||||
@ -59,19 +59,13 @@ public class BlockCrate extends BlockFalling {
|
||||
BlockCrate.addToListWithWeight(crateList, ModItems.ammo_container, 2);
|
||||
|
||||
// Weapon Crate
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver, 9);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_gold, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_revolver_cursed, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_calamity, 3);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_rpg, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_karl, 4);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_panzerschreck, 6);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_hk69, 8);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_mp40, 9);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi_silencer, 5);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uboinik, 8);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_lever_action, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_bolt_action, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_light_revolver, 10);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_maresleg, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_heavy_revolver, 5);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_greasegun, 5);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_liberator, 2);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_flaregun, 8);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_panzerschreck, 1);
|
||||
|
||||
// Lead Crate
|
||||
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_uranium, 10);
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import com.hbm.inventory.recipes.PedestalRecipes;
|
||||
import com.hbm.inventory.recipes.PedestalRecipes.PedestalRecipe;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.particle.helper.ExplosionSmallCreator;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -20,6 +24,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockPedestal extends BlockContainer {
|
||||
|
||||
@ -108,6 +113,73 @@ public class BlockPedestal extends BlockContainer {
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block b) {
|
||||
if(!world.isRemote) {
|
||||
if(world.isBlockIndirectlyGettingPowered(x, y, z)) {
|
||||
|
||||
TileEntityPedestal nw = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.NORTH.offsetX * 2 + ForgeDirection.WEST.offsetX * 2, y, z + ForgeDirection.NORTH.offsetZ * 2 + ForgeDirection.WEST.offsetZ * 2));
|
||||
TileEntityPedestal n = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.NORTH.offsetX * 3, y, z + ForgeDirection.NORTH.offsetZ * 3));
|
||||
TileEntityPedestal ne = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.NORTH.offsetX * 2 + ForgeDirection.EAST.offsetX * 2, y, z + ForgeDirection.NORTH.offsetZ * 2 + ForgeDirection.EAST.offsetZ * 2));
|
||||
TileEntityPedestal w = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.WEST.offsetX * 3, y, z + ForgeDirection.WEST.offsetZ * 3));
|
||||
TileEntityPedestal center = (TileEntityPedestal) world.getTileEntity(x, y, z);
|
||||
TileEntityPedestal e = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.EAST.offsetX * 3, y, z + ForgeDirection.EAST.offsetZ * 3));
|
||||
TileEntityPedestal sw = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.SOUTH.offsetX * 2 + ForgeDirection.WEST.offsetX * 2, y, z + ForgeDirection.SOUTH.offsetZ * 2 + ForgeDirection.WEST.offsetZ * 2));
|
||||
TileEntityPedestal s = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.SOUTH.offsetX * 3, y, z + ForgeDirection.SOUTH.offsetZ * 3));
|
||||
TileEntityPedestal se = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.SOUTH.offsetX * 2 + ForgeDirection.EAST.offsetX * 2, y, z + ForgeDirection.SOUTH.offsetZ * 2 + ForgeDirection.EAST.offsetZ * 2));
|
||||
|
||||
TileEntityPedestal[] tileArray = new TileEntityPedestal[] {nw, n, ne, w, center, e, sw, s, se};
|
||||
|
||||
outer: for(PedestalRecipe recipe : PedestalRecipes.recipes) {
|
||||
|
||||
if(recipe.extra == recipe.extra.FULL_MOON) {
|
||||
if(world.getCelestialAngle(0) < 0.35 || world.getCelestialAngle(0) > 0.65) continue;
|
||||
if(world.getMoonPhase() != 0) continue;
|
||||
}
|
||||
|
||||
if(recipe.extra == recipe.extra.NEW_MOON) {
|
||||
if(world.getCelestialAngle(0) < 0.35 || world.getCelestialAngle(0) > 0.65) continue;
|
||||
if(world.getMoonPhase() != 4) continue;
|
||||
}
|
||||
|
||||
if(recipe.extra == recipe.extra.SUN) {
|
||||
if(world.getCelestialAngle(0) > 0.15 || world.getCelestialAngle(0) < 0.85) continue;
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
ItemStack pedestal = tileArray[i] != null ? tileArray[i].item : null;
|
||||
if(pedestal == null && recipe.input[i] != null) continue outer;
|
||||
if(pedestal != null && recipe.input[i] == null) continue outer;
|
||||
if(pedestal == null && recipe.input[i] == null) continue;
|
||||
|
||||
if(!recipe.input[i].matchesRecipe(pedestal, true) || recipe.input[i].stacksize != pedestal.stackSize) continue outer;
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
if(i == 4) continue;
|
||||
ItemStack pedestal = tileArray[i] != null ? tileArray[i].item : null;
|
||||
if(pedestal == null && recipe.input[i] == null) continue;
|
||||
tileArray[i].item = null;
|
||||
tileArray[i].markDirty();
|
||||
world.markBlockForUpdate(tileArray[i].xCoord, tileArray[i].yCoord, tileArray[i].zCoord);
|
||||
}
|
||||
|
||||
center.item = recipe.output.copy();
|
||||
center.markDirty();
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
ExplosionSmallCreator.composeEffect(world, x + 0.5, y + 1.5, z + 0.5, 10, 2.5F, 1F);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static TileEntityPedestal castOrNull(TileEntity tile) {
|
||||
if(tile instanceof TileEntityPedestal) return (TileEntityPedestal) tile;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class TileEntityPedestal extends TileEntity {
|
||||
|
||||
public ItemStack item;
|
||||
|
||||
@ -1,14 +1,9 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.deco.TileEntityDecoBlockAlt;
|
||||
import com.hbm.tileentity.deco.TileEntityDecoBlockAltF;
|
||||
import com.hbm.tileentity.deco.TileEntityDecoBlockAltG;
|
||||
import com.hbm.tileentity.deco.TileEntityDecoBlockAltW;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -17,7 +12,6 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@ -34,37 +28,14 @@ public class DecoBlockAlt extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
//this.blockIcon = iconRegister.registerIcon("stone");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":code");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
if(this == ModBlocks.statue_elb)
|
||||
return new TileEntityDecoBlockAlt();
|
||||
if(this == ModBlocks.statue_elb_g)
|
||||
return new TileEntityDecoBlockAltG();
|
||||
if(this == ModBlocks.statue_elb_w)
|
||||
return new TileEntityDecoBlockAltW();
|
||||
if(this == ModBlocks.statue_elb_f)
|
||||
return new TileEntityDecoBlockAltF();
|
||||
if(this == ModBlocks.statue_elb_f) return new TileEntityDecoBlockAltF();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
|
||||
{
|
||||
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
drops.add(new ItemStack(Item.getItemFromBlock(ModBlocks.statue_elb)));
|
||||
if (this == ModBlocks.statue_elb_g || this == ModBlocks.statue_elb_f)
|
||||
{
|
||||
drops.add(new ItemStack(ModItems.gun_revolver_cursed, 1, 0));
|
||||
}
|
||||
if (this == ModBlocks.statue_elb_w || this == ModBlocks.statue_elb_f) {
|
||||
drops.add(new ItemStack(ModItems.watch, 1, 0));
|
||||
}
|
||||
return drops;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
@ -84,89 +55,33 @@ public class DecoBlockAlt extends BlockContainer {
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if(i == 0)
|
||||
{
|
||||
|
||||
if(i == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
if(i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
if(i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if(i == 3)
|
||||
{
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote)
|
||||
{
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
if(player.getCurrentEquippedItem() != null)
|
||||
{
|
||||
if(this == ModBlocks.statue_elb)
|
||||
{
|
||||
if(player.getCurrentEquippedItem().getItem() == ModItems.gun_revolver_cursed)
|
||||
{
|
||||
world.setBlock(x, y, z, ModBlocks.statue_elb_g, world.getBlockMetadata(x, y, z), 2);
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
--player.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if(player.getCurrentEquippedItem().getItem() == ModItems.watch)
|
||||
{
|
||||
world.setBlock(x, y, z, ModBlocks.statue_elb_w, world.getBlockMetadata(x, y, z), 2);
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
--player.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(this == ModBlocks.statue_elb_g)
|
||||
{
|
||||
if(player.getCurrentEquippedItem().getItem() == ModItems.watch)
|
||||
{
|
||||
world.setBlock(x, y, z, ModBlocks.statue_elb_f, world.getBlockMetadata(x, y, z), 2);
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
--player.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(this == ModBlocks.statue_elb_w)
|
||||
{
|
||||
if(player.getCurrentEquippedItem().getItem() == ModItems.gun_revolver_cursed)
|
||||
{
|
||||
world.setBlock(x, y, z, ModBlocks.statue_elb_f, world.getBlockMetadata(x, y, z), 2);
|
||||
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
--player.getCurrentEquippedItem().stackSize;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else if(!player.isSneaking()) {
|
||||
|
||||
if(player.getCurrentEquippedItem() != null) {
|
||||
boolean cracked = player.getHeldItem().getItem() == ModItems.key_red_cracked;
|
||||
|
||||
if((player.getHeldItem().getItem() == ModItems.key_red || cracked)) {
|
||||
if(cracked) player.getHeldItem().stackSize--;
|
||||
world.func_147480_a(x, y, z, false);
|
||||
this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
|
||||
world.func_147480_a(x, y, z, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -175,17 +90,15 @@ public class DecoBlockAlt extends BlockContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
|
||||
{
|
||||
float f = 0.0625F;
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 8*f, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
float f = 0.0625F;
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 8*f, 1.0F);
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
|
||||
float f = 0.0625F;
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 8 * f, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
float f = 0.0625F;
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 8 * f, 1.0F);
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ package com.hbm.commands;
|
||||
import com.hbm.config.ItemPoolConfigJSON;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ChatBuilder;
|
||||
import com.hbm.util.DamageResistanceHandler;
|
||||
|
||||
@ -12,10 +11,6 @@ import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
||||
|
||||
public class CommandReloadRecipes extends CommandBase {
|
||||
|
||||
@Override
|
||||
@ -34,7 +29,7 @@ public class CommandReloadRecipes extends CommandBase {
|
||||
SerializableRecipe.initialize();
|
||||
ItemPoolConfigJSON.initialize();
|
||||
DamageResistanceHandler.init();
|
||||
Fluids.reloadFluids();
|
||||
Fluids.reloadFluids();
|
||||
|
||||
sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Reload complete :)"));
|
||||
} catch(Exception ex) {
|
||||
|
||||
@ -195,7 +195,6 @@ public class WeaponRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.grenade_gascan, 1), new Object[] { Fluids.GASOLINE_LEADED.getDict(1000), Items.flint });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.grenade_gascan, 1), new Object[] { Fluids.BIOFUEL.getDict(1000), Items.flint });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.grenade_lemon, 1), new Object[] { ModItems.lemon, ModItems.grenade_strong });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.gun_moist_nugget, 12), new Object[] { Items.bread, Items.wheat, Items.cooked_chicken, Items.egg });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_smart, 4), new Object[] { " A ", "ACA", " A ", 'A', ModItems.grenade_strong, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP) });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_mirv, 1), new Object[] { "GGG", "GCG", "GGG", 'G', ModItems.grenade_smart, 'C', ModItems.grenade_generic });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_breach, 1), new Object[] { "G", "G", "P", 'G', ModItems.grenade_smart, 'P', BIGMT.plate() });
|
||||
|
||||
@ -103,13 +103,13 @@ public class EntityMappings {
|
||||
addEntity(EntityVortex.class, "entity_vortex", 250);
|
||||
addEntity(EntityMeteor.class, "entity_meteor", 250);
|
||||
addEntity(EntityBoxcar.class, "entity_boxcar", 1000);
|
||||
addEntity(EntityTorpedo.class, "entity_torpedo", 1000);
|
||||
addEntity(EntityMissileTaint.class, "entity_missile_taint", 1000);
|
||||
addEntity(EntityGrenadeGascan.class, "entity_grenade_gascan", 1000);
|
||||
addEntity(EntityNukeExplosionMK5.class, "entity_nuke_mk5", 1000);
|
||||
addEntity(EntityCloudFleijaRainbow.class, "entity_cloud_rainbow", 1000);
|
||||
addEntity(EntityExplosiveBeam.class, "entity_beam_bomb", 1000);
|
||||
addEntity(EntityAAShell.class, "entity_aa_shell", 1000);
|
||||
addEntity(EntityRocketHoming.class, "entity_stinger", 1000);
|
||||
addEntity(EntityMissileTest.class, "entity_missile_test_mk2", 1000);
|
||||
addEntity(EntityMissileMicro.class, "entity_missile_micronuclear", 1000);
|
||||
addEntity(EntityCloudSolinium.class, "entity_cloud_rainbow", 1000);
|
||||
|
||||
@ -3,7 +3,6 @@ package com.hbm.entity.logic;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.projectile.EntityBombletZeta;
|
||||
import com.hbm.entity.projectile.EntityBoxcar;
|
||||
import com.hbm.entity.projectile.EntityRocketHoming;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -65,17 +64,6 @@ public class EntityBomber extends EntityPlaneBase {
|
||||
ExplosionChaos.spawnChlorine(worldObj, this.posX, this.posY - 1F, this.posZ, 10, 0.5, 3);
|
||||
|
||||
} else if(type == 5) {
|
||||
worldObj.playSoundEffect((double) (posX + 0.5F), (double) (posY + 0.5F), (double) (posZ + 0.5F), "hbm:weapon.missileTakeOff", 10.0F, 0.9F + rand.nextFloat() * 0.2F);
|
||||
EntityRocketHoming rocket = new EntityRocketHoming(worldObj);
|
||||
rocket.setIsCritical(true);
|
||||
rocket.motionY = -1;
|
||||
rocket.shootingEntity = this;
|
||||
rocket.homingRadius = 50;
|
||||
rocket.homingMod = 5;
|
||||
rocket.posX = posX + rand.nextDouble() - 0.5;
|
||||
rocket.posY = posY - rand.nextDouble();
|
||||
rocket.posZ = posZ + rand.nextDouble() - 0.5;
|
||||
worldObj.spawnEntityInWorld(rocket);
|
||||
|
||||
} else if(type == 6) {
|
||||
worldObj.playSoundEffect((double) (posX + 0.5F), (double) (posY + 0.5F), (double) (posZ + 0.5F), "hbm:weapon.missileTakeOff", 10.0F, 0.9F + rand.nextFloat() * 0.2F);
|
||||
|
||||
@ -22,6 +22,19 @@ import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||
|
||||
public abstract class EntityPlaneBase extends Entity implements IChunkLoader {
|
||||
|
||||
protected int turnProgress;
|
||||
protected double syncPosX;
|
||||
protected double syncPosY;
|
||||
protected double syncPosZ;
|
||||
protected double syncYaw;
|
||||
protected double syncPitch;
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected double velocityX;
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected double velocityY;
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected double velocityZ;
|
||||
|
||||
private Ticket loaderTicket;
|
||||
private List<ChunkCoordIntPair> loadedChunks = new ArrayList<ChunkCoordIntPair>();
|
||||
@ -72,37 +85,57 @@ public abstract class EntityPlaneBase extends Entity implements IChunkLoader {
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
this.lastTickPosX = this.prevPosX = posX;
|
||||
this.lastTickPosY = this.prevPosY = posY;
|
||||
this.lastTickPosZ = this.prevPosZ = posZ;
|
||||
this.setPosition(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
this.dataWatcher.updateObject(17, health);
|
||||
} else {
|
||||
health = this.dataWatcher.getWatchableObjectFloat(17);
|
||||
}
|
||||
|
||||
this.rotation();
|
||||
|
||||
if(this.health <= 0) {
|
||||
motionY -= 0.025;
|
||||
|
||||
if(worldObj.isRemote) {
|
||||
|
||||
for(int i = 0; i < 10; i++) ParticleUtil.spawnGasFlame(this.worldObj, this.posX + rand.nextGaussian() * 0.5 - motionX * 2, this.posY + rand.nextGaussian() * 0.5 - motionY * 2, this.posZ + rand.nextGaussian() * 0.5 - motionZ * 2, 0.0, 0.1, 0.0);
|
||||
|
||||
if((!worldObj.getBlock((int) posX, (int) posY, (int) posZ).isAir(worldObj, (int) posX, (int) posY, (int) posZ) || posY < 0) && !worldObj.isRemote) {
|
||||
this.setDead();
|
||||
new ExplosionVNT(worldObj, posX, posY, posZ, 15F).makeStandard().explode();
|
||||
worldObj.playSoundEffect(posX, posY, posZ, "hbm:entity.planeCrash", 25.0F, 1.0F);
|
||||
return;
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
if(this.turnProgress > 0) {
|
||||
double interpX = this.posX + (this.syncPosX - this.posX) / (double) this.turnProgress;
|
||||
double interpY = this.posY + (this.syncPosY - this.posY) / (double) this.turnProgress;
|
||||
double interpZ = this.posZ + (this.syncPosZ - this.posZ) / (double) this.turnProgress;
|
||||
double d = MathHelper.wrapAngleTo180_double(this.syncYaw - (double) this.rotationYaw);
|
||||
this.rotationYaw = (float) ((double) this.rotationYaw + d / (double) this.turnProgress);
|
||||
this.rotationPitch = (float)((double)this.rotationPitch + (this.syncPitch - (double)this.rotationPitch) / (double)this.turnProgress);
|
||||
--this.turnProgress;
|
||||
this.setPosition(interpX, interpY, interpZ);
|
||||
} else {
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
}
|
||||
|
||||
} else {
|
||||
this.motionY = 0F;
|
||||
this.lastTickPosX = this.prevPosX = posX;
|
||||
this.lastTickPosY = this.prevPosY = posY;
|
||||
this.lastTickPosZ = this.prevPosZ = posZ;
|
||||
this.setPosition(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
|
||||
this.rotation();
|
||||
|
||||
if(this.health <= 0) {
|
||||
motionY -= 0.025;
|
||||
|
||||
for(int i = 0; i < 10; i++) ParticleUtil.spawnGasFlame(this.worldObj, this.posX + rand.nextGaussian() * 0.5 - motionX * 2, this.posY + rand.nextGaussian() * 0.5 - motionY * 2, this.posZ + rand.nextGaussian() * 0.5 - motionZ * 2, 0.0, 0.1, 0.0);
|
||||
|
||||
if((!worldObj.getBlock((int) posX, (int) posY, (int) posZ).isAir(worldObj, (int) posX, (int) posY, (int) posZ) || posY < 0)) {
|
||||
this.setDead();
|
||||
new ExplosionVNT(worldObj, posX, posY, posZ, 15F).makeStandard().explode();
|
||||
worldObj.playSoundEffect(posX, posY, posZ, "hbm:entity.planeCrash", 25.0F, 1.0F);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.motionY = 0F;
|
||||
}
|
||||
|
||||
if(this.ticksExisted > timer) this.setDead();
|
||||
loadNeighboringChunks((int)Math.floor(posX / 16D), (int)Math.floor(posZ / 16D));
|
||||
}
|
||||
|
||||
if(this.ticksExisted > timer) this.setDead();
|
||||
if(!worldObj.isRemote) loadNeighboringChunks((int)Math.floor(posX / 16D), (int)Math.floor(posZ / 16D));
|
||||
}
|
||||
|
||||
protected void rotation() {
|
||||
@ -113,6 +146,26 @@ public abstract class EntityPlaneBase extends Entity implements IChunkLoader {
|
||||
while(this.rotationYaw - this.prevRotationYaw < -180.0F) this.prevRotationYaw -= 360.0F;
|
||||
while(this.rotationYaw - this.prevRotationYaw >= 180.0F) this.prevRotationYaw += 360.0F;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setVelocity(double velX, double velY, double velZ) {
|
||||
this.velocityX = this.motionX = velX;
|
||||
this.velocityY = this.motionY = velY;
|
||||
this.velocityZ = this.motionZ = velZ;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setPositionAndRotation2(double x, double y, double z, float yaw, float pitch, int theNumberThree) {
|
||||
this.syncPosX = x;
|
||||
this.syncPosY = y;
|
||||
this.syncPosZ = z;
|
||||
this.syncYaw = yaw;
|
||||
this.syncPitch = pitch;
|
||||
this.turnProgress = theNumberThree;
|
||||
this.motionX = this.velocityX;
|
||||
this.motionY = this.velocityY;
|
||||
this.motionZ = this.velocityZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDead() {
|
||||
|
||||
@ -97,13 +97,13 @@ public class EntityArtilleryRocket extends EntityThrowableInterp implements IChu
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(this.targetEntity == null) {
|
||||
/*if(this.targetEntity == null) {
|
||||
Vec3 delta = Vec3.createVectorHelper(this.lastTargetPos.xCoord - this.posX, this.lastTargetPos.yCoord - this.posY, this.lastTargetPos.zCoord - this.posZ);
|
||||
if(delta.lengthVector() <= 15D) {
|
||||
this.targeting = null;
|
||||
this.steering = null;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if(this.targeting != null && this.targetEntity != null) this.targeting.recalculateTargetPosition(this, this.targetEntity);
|
||||
if(this.steering != null) this.steering.adjustCourse(this, 25D, 15D);
|
||||
|
||||
@ -5,12 +5,16 @@ import java.util.List;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
|
||||
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;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
@ -26,6 +30,17 @@ public class EntityBoxcar extends EntityThrowable {
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(!worldObj.isRemote && this.ticksExisted == 1) {
|
||||
for(int i = 0; i < 50; i++) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "bf");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data,
|
||||
posX + (rand.nextDouble() - 0.5) * 3,
|
||||
posY + (rand.nextDouble() - 0.5) * 15,
|
||||
posZ + (rand.nextDouble() - 0.5) * 3),
|
||||
new TargetPoint(dimension, posX, posY, posZ, 150));
|
||||
}
|
||||
}
|
||||
|
||||
this.lastTickPosX = this.prevPosX = posX;
|
||||
this.lastTickPosY = this.prevPosY = posY;
|
||||
@ -52,7 +67,7 @@ public class EntityBoxcar extends EntityThrowable {
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
worldObj.setBlock((int) (this.posX - 0.5), (int) (this.posY + 0.5), (int) (this.posZ - 0.5), ModBlocks.boxcar);
|
||||
worldObj.setBlock((int) Math.floor(this.posX), (int) Math.floor(this.posY + 0.5), (int) Math.floor(this.posZ), ModBlocks.boxcar);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,12 +5,16 @@ import java.util.List;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
|
||||
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;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
@ -26,52 +30,54 @@ public class EntityDuchessGambit extends EntityThrowable {
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(!worldObj.isRemote && this.ticksExisted == 1) {
|
||||
for(int i = 0; i < 50; i++) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "bf");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data,
|
||||
posX + (rand.nextDouble() - 0.5) * 5,
|
||||
posY + (rand.nextDouble() - 0.5) * 7,
|
||||
posZ + (rand.nextDouble() - 0.5) * 20),
|
||||
new TargetPoint(dimension, posX, posY, posZ, 150));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.lastTickPosX = this.prevPosX = posX;
|
||||
this.lastTickPosY = this.prevPosY = posY;
|
||||
this.lastTickPosZ = this.prevPosZ = posZ;
|
||||
this.setPosition(posX + this.motionX, posY + this.motionY, posZ + this.motionZ);
|
||||
|
||||
/*this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;*/
|
||||
|
||||
this.motionY -= 0.03;
|
||||
if(motionY < -1.5)
|
||||
motionY = -1.5;
|
||||
|
||||
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air)
|
||||
{
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:alarm.gambit", 10000.0F, 1F);
|
||||
this.setDead();
|
||||
|
||||
List<Entity> list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 5, posY - 2, posZ - 9, posX + 5, posY + 2, posZ + 9));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.attackEntityFrom(ModDamageSource.boat, 1000);
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ - 6, 2, true, false, false);
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ - 3, 2, true, false, false);
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 2, true, false, false);
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ + 3, 2, true, false, false);
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ + 6, 2, true, false, false);
|
||||
|
||||
worldObj.setBlock((int)(this.posX - 0.5), (int)(this.posY + 0.5), (int)(this.posZ - 0.5), ModBlocks.boat);
|
||||
}
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2.5);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1.5);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if(this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:alarm.gambit", 10000.0F, 1F);
|
||||
this.setDead();
|
||||
|
||||
List<Entity> list = (List<Entity>) worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(posX - 5, posY - 2, posZ - 9, posX + 5, posY + 2, posZ + 9));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.attackEntityFrom(ModDamageSource.boat, 1000);
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ - 6, 2, true, false, false);
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ - 3, 2, true, false, false);
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 2, true, false, false);
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ + 3, 2, true, false, false);
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ + 6, 2, true, false, false);
|
||||
|
||||
worldObj.setBlock((int) (this.posX - 0.5), (int) (this.posY + 0.5), (int) (this.posZ - 0.5), ModBlocks.boat);
|
||||
}
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2.5);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1.5);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition p_70184_1_) {
|
||||
|
||||
@ -24,6 +24,7 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
// still in use for cluster munitions - somehow! let this fucking class die already
|
||||
public class EntityRocket extends Entity implements IProjectile
|
||||
{
|
||||
private int field_145791_d = -1;
|
||||
|
||||
@ -1,750 +0,0 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNukeSmall;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.play.server.S2BPacketChangeGameState;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityRocketHoming extends Entity implements IProjectile
|
||||
{
|
||||
private int field_145791_d = -1;
|
||||
private int field_145792_e = -1;
|
||||
private int field_145789_f = -1;
|
||||
public double gravity = 0.0D;
|
||||
private Block field_145790_g;
|
||||
private int inData;
|
||||
private boolean inGround;
|
||||
public int canBePickedUp;
|
||||
public int arrowShake;
|
||||
public Entity shootingEntity;
|
||||
private int ticksInGround;
|
||||
private int ticksInAir;
|
||||
private double damage = 2.0D;
|
||||
private int knockbackStrength;
|
||||
private float explosionStrength;
|
||||
|
||||
// specifies the type of stinger rocket that was fired
|
||||
/* 0 = Normal
|
||||
* 1 = HE
|
||||
* 2 = Incendiary
|
||||
* 4 = Nuclear
|
||||
* 42 = bone-seeking
|
||||
*/
|
||||
public int type;
|
||||
|
||||
|
||||
public EntityRocketHoming(World p_i1753_1_)
|
||||
{
|
||||
super(p_i1753_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
}
|
||||
|
||||
public EntityRocketHoming(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_)
|
||||
{
|
||||
super(p_i1754_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_);
|
||||
this.yOffset = 0.0F;
|
||||
}
|
||||
|
||||
public EntityRocketHoming(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_, int rocketType)
|
||||
{
|
||||
super(p_i1755_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.shootingEntity = p_i1755_2_;
|
||||
this.type = rocketType;
|
||||
|
||||
if (p_i1755_2_ instanceof EntityPlayer)
|
||||
{
|
||||
this.canBePickedUp = 1;
|
||||
}
|
||||
|
||||
this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D;
|
||||
double d0 = p_i1755_3_.posX - p_i1755_2_.posX;
|
||||
double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY;
|
||||
double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ;
|
||||
double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2);
|
||||
|
||||
if (d3 >= 1.0E-7D)
|
||||
{
|
||||
float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
|
||||
float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI));
|
||||
double d4 = d0 / d3;
|
||||
double d5 = d2 / d3;
|
||||
this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3);
|
||||
this.yOffset = 0.0F;
|
||||
float f4 = (float)d3 * 0.2F;
|
||||
this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_);
|
||||
}
|
||||
}
|
||||
|
||||
public EntityRocketHoming(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, float strength, int type)
|
||||
{
|
||||
super(p_i1756_1_);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.shootingEntity = p_i1756_2_;
|
||||
this.type = type;
|
||||
|
||||
if (p_i1756_2_ instanceof EntityPlayer)
|
||||
{
|
||||
this.canBePickedUp = 1;
|
||||
}
|
||||
|
||||
this.setSize(0.5F, 0.5F);
|
||||
this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch);
|
||||
this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F;
|
||||
this.posY -= 0.10000000149011612D;
|
||||
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.yOffset = 0.0F;
|
||||
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI);
|
||||
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI);
|
||||
this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI));
|
||||
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F);
|
||||
this.explosionStrength = strength;
|
||||
}
|
||||
|
||||
public EntityRocketHoming(World world, int x, int y, int z, double mx, double my, double mz, double grav) {
|
||||
super(world);
|
||||
this.posX = x + 0.5F;
|
||||
this.posY = y + 0.5F;
|
||||
this.posZ = z + 0.5F;
|
||||
|
||||
this.motionX = mx;
|
||||
this.motionY = my;
|
||||
this.motionZ = mz;
|
||||
|
||||
this.gravity = grav;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit()
|
||||
{
|
||||
this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
|
||||
*/
|
||||
@Override
|
||||
public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_)
|
||||
{
|
||||
float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_);
|
||||
p_70186_1_ /= f2;
|
||||
p_70186_3_ /= f2;
|
||||
p_70186_5_ /= f2;
|
||||
p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_;
|
||||
p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_;
|
||||
p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_;
|
||||
p_70186_1_ *= p_70186_7_;
|
||||
p_70186_3_ *= p_70186_7_;
|
||||
p_70186_5_ *= p_70186_7_;
|
||||
this.motionX = p_70186_1_;
|
||||
this.motionY = p_70186_3_;
|
||||
this.motionZ = p_70186_5_;
|
||||
float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI);
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX,
|
||||
* posY, posZ, yaw, pitch
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_)
|
||||
{
|
||||
this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_);
|
||||
this.setRotation(p_70056_7_, p_70056_8_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the velocity to the args. Args: x, y, z
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)
|
||||
{
|
||||
this.motionX = p_70016_1_;
|
||||
this.motionY = p_70016_3_;
|
||||
this.motionZ = p_70016_5_;
|
||||
|
||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
|
||||
{
|
||||
float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch;
|
||||
this.prevRotationYaw = this.rotationYaw;
|
||||
this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
//@Override
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
|
||||
{
|
||||
MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
//this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI);
|
||||
}
|
||||
|
||||
Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
|
||||
if (block.getMaterial() != Material.air)
|
||||
{
|
||||
block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
|
||||
if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))
|
||||
{
|
||||
this.inGround = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.arrowShake > 0)
|
||||
{
|
||||
--this.arrowShake;
|
||||
}
|
||||
|
||||
if (this.inGround)
|
||||
{
|
||||
/*int j = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
if (block == this.field_145790_g && j == this.inData)
|
||||
{
|
||||
++this.ticksInGround;
|
||||
if (this.ticksInGround == 1200)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.inGround = false;
|
||||
this.motionX *= (double)(this.rand.nextFloat() * 0.2F);
|
||||
this.motionY *= (double)(this.rand.nextFloat() * 0.2F);
|
||||
this.motionZ *= (double)(this.rand.nextFloat() * 0.2F);
|
||||
this.ticksInGround = 0;
|
||||
this.ticksInAir = 0;
|
||||
}*/
|
||||
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
//this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.5F, true);
|
||||
Explode(this.type, this.explosionStrength);
|
||||
/*EntityNukeExplosionAdvanced explosion = new EntityNukeExplosionAdvanced(this.worldObj);
|
||||
explosion.speed = 25;
|
||||
explosion.coefficient = 5.0F;
|
||||
explosion.destructionRange = 20;
|
||||
explosion.posX = this.posX;
|
||||
explosion.posY = this.posY;
|
||||
explosion.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(explosion);*/
|
||||
}
|
||||
this.setDead();
|
||||
}
|
||||
else
|
||||
{
|
||||
++this.ticksInAir;
|
||||
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
|
||||
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
|
||||
if (movingobjectposition != null)
|
||||
{
|
||||
vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
|
||||
}
|
||||
|
||||
Entity entity = null;
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
|
||||
double d0 = 0.0D;
|
||||
int i;
|
||||
float f1;
|
||||
|
||||
for (i = 0; i < list.size(); ++i)
|
||||
{
|
||||
Entity entity1 = (Entity)list.get(i);
|
||||
|
||||
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5))
|
||||
{
|
||||
f1 = 0.3F;
|
||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);
|
||||
|
||||
if (movingobjectposition1 != null)
|
||||
{
|
||||
double d1 = vec31.distanceTo(movingobjectposition1.hitVec);
|
||||
|
||||
if (d1 < d0 || d0 == 0.0D)
|
||||
{
|
||||
entity = entity1;
|
||||
d0 = d1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
movingobjectposition = new MovingObjectPosition(entity);
|
||||
}
|
||||
|
||||
if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit;
|
||||
|
||||
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer))
|
||||
{
|
||||
movingobjectposition = null;
|
||||
}
|
||||
}
|
||||
|
||||
float f2;
|
||||
float f4;
|
||||
|
||||
if (movingobjectposition != null)
|
||||
{
|
||||
if (movingobjectposition.entityHit != null)
|
||||
{
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
int k = MathHelper.ceiling_double_int(f2 * this.damage);
|
||||
|
||||
if (this.getIsCritical())
|
||||
{
|
||||
k += this.rand.nextInt(k / 2 + 2);
|
||||
}
|
||||
|
||||
DamageSource damagesource = null;
|
||||
|
||||
if (this.shootingEntity == null)
|
||||
{
|
||||
damagesource = DamageSource.causeIndirectMagicDamage(this, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
damagesource = DamageSource.causeIndirectMagicDamage(this, this);
|
||||
}
|
||||
|
||||
if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman))
|
||||
{
|
||||
movingobjectposition.entityHit.setFire(5);
|
||||
}
|
||||
|
||||
if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k))
|
||||
{
|
||||
if (movingobjectposition.entityHit instanceof EntityLivingBase)
|
||||
{
|
||||
EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit;
|
||||
|
||||
if (this.knockbackStrength > 0)
|
||||
{
|
||||
f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
|
||||
if (f4 > 0.0F)
|
||||
{
|
||||
movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase)
|
||||
{
|
||||
EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity);
|
||||
EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase);
|
||||
}
|
||||
|
||||
if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP)
|
||||
{
|
||||
((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F));
|
||||
}
|
||||
}
|
||||
|
||||
if (!(movingobjectposition.entityHit instanceof EntityEnderman))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
//this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.5F, true);
|
||||
Explode(this.type, this.explosionStrength);
|
||||
}
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
//this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.5F, true);
|
||||
Explode(this.type, this.explosionStrength);
|
||||
}
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.field_145791_d = movingobjectposition.blockX;
|
||||
this.field_145792_e = movingobjectposition.blockY;
|
||||
this.field_145789_f = movingobjectposition.blockZ;
|
||||
this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
||||
this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX));
|
||||
this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY));
|
||||
this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ));
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
this.posX -= this.motionX / f2 * 0.05000000074505806D;
|
||||
this.posY -= this.motionY / f2 * 0.05000000074505806D;
|
||||
this.posZ -= this.motionZ / f2 * 0.05000000074505806D;
|
||||
this.inGround = true;
|
||||
this.arrowShake = 7;
|
||||
this.setIsCritical(false);
|
||||
|
||||
if (this.field_145790_g.getMaterial() != Material.air)
|
||||
{
|
||||
this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
|
||||
//for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
|
||||
{
|
||||
this.prevRotationPitch += 360.0F;
|
||||
}
|
||||
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
|
||||
{
|
||||
this.prevRotationYaw -= 360.0F;
|
||||
}
|
||||
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
|
||||
{
|
||||
this.prevRotationYaw += 360.0F;
|
||||
}*/
|
||||
|
||||
f1 = 0.05F;
|
||||
|
||||
if (this.isInWater())
|
||||
{
|
||||
for (int l = 0; l < 4; ++l)
|
||||
{
|
||||
f4 = 0.25F;
|
||||
this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f4, this.posY - this.motionY * f4, this.posZ - this.motionZ * f4, this.motionX, this.motionY, this.motionZ);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.isWet())
|
||||
{
|
||||
this.extinguish();
|
||||
}
|
||||
|
||||
/*this.motionX *= f3;
|
||||
this.motionY *= f3;
|
||||
this.motionZ *= f3;*/
|
||||
//this.motionY -= gravity;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.func_145775_I();
|
||||
}
|
||||
|
||||
if(!steer())
|
||||
lockonTicks = 0;
|
||||
|
||||
if (this.ticksExisted > 250)
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
public int homingRadius = 35;
|
||||
public int homingMod = 15;
|
||||
public float acceptance = 120;
|
||||
int lockonTicks = 0;
|
||||
boolean hasBeeped = false;
|
||||
|
||||
private boolean steer() {
|
||||
List<Entity> all = null;
|
||||
if(this.type == 42) {
|
||||
all = worldObj.getEntitiesWithinAABB(EntitySkeleton.class, AxisAlignedBB.getBoundingBox(posX - homingRadius, posY - homingRadius, posZ - homingRadius, posX + homingRadius, posY + homingRadius, posZ + homingRadius));
|
||||
} else {
|
||||
all = worldObj.getEntitiesWithinAABBExcludingEntity(this, AxisAlignedBB.getBoundingBox(posX - homingRadius, posY - homingRadius, posZ - homingRadius, posX + homingRadius, posY + homingRadius, posZ + homingRadius));
|
||||
}
|
||||
|
||||
HashMap<Entity, Double> targetable = new HashMap();
|
||||
Vec3 path = Vec3.createVectorHelper(motionX, motionY, motionZ);
|
||||
double startSpeed = path.lengthVector();
|
||||
path.normalize();
|
||||
|
||||
if(all.isEmpty())
|
||||
return false;
|
||||
|
||||
//Iterate through all entities and only allocate ones that can be targeted
|
||||
for(Entity e : all) {
|
||||
|
||||
if(e == this.shootingEntity)
|
||||
continue;
|
||||
|
||||
Vec3 rel = Vec3.createVectorHelper(e.posX - posX, e.posY + e.getEyeHeight() - posY, e.posZ - posZ);
|
||||
double vecProd = rel.xCoord * path.xCoord + rel.yCoord * path.yCoord + rel.zCoord * path.zCoord;
|
||||
double bot = rel.lengthVector() * path.lengthVector();
|
||||
double angle = Math.acos(vecProd / bot) * 180 / Math.PI;
|
||||
|
||||
if(angle <= acceptance);
|
||||
if(e.height * e.width * e.width >= 0.5D)
|
||||
if(!Library.isObstructed(worldObj, e.posX, e.posY, e.posZ, posX, posY, posZ))
|
||||
targetable.put(e, angle);
|
||||
}
|
||||
|
||||
if(targetable.isEmpty())
|
||||
return false;
|
||||
|
||||
double smallest = Double.POSITIVE_INFINITY;
|
||||
Entity nearestE = null;
|
||||
|
||||
//Iterate through all entities and choose the one that has the smallest angle
|
||||
for(Map.Entry<Entity, Double> entry : targetable.entrySet()) {
|
||||
if(entry.getValue() < smallest) {
|
||||
smallest = entry.getValue();
|
||||
nearestE = entry.getKey();
|
||||
}
|
||||
}
|
||||
|
||||
if(nearestE == null)
|
||||
return false;
|
||||
|
||||
Vec3 winVec = Vec3.createVectorHelper(nearestE.posX - posX, nearestE.posY - posY, nearestE.posZ - posZ);
|
||||
|
||||
winVec.normalize();
|
||||
|
||||
double newX = ((path.xCoord * (smallest * homingMod - 1)) + winVec.xCoord) / (smallest * homingMod);
|
||||
double newY = ((path.yCoord * (smallest * homingMod - 1)) + winVec.yCoord) / (smallest * homingMod);
|
||||
double newZ = ((path.zCoord * (smallest * homingMod - 1)) + winVec.zCoord) / (smallest * homingMod);
|
||||
|
||||
Vec3 newPath = Vec3.createVectorHelper(newX, newY, newZ);
|
||||
newPath.normalize();
|
||||
newPath.xCoord *= startSpeed;
|
||||
newPath.yCoord *= startSpeed;
|
||||
newPath.zCoord *= startSpeed;
|
||||
|
||||
motionX = newPath.xCoord;
|
||||
motionY = newPath.yCoord;
|
||||
motionZ = newPath.zCoord;
|
||||
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, (float)startSpeed, 0.0F);
|
||||
|
||||
lockonTicks++;
|
||||
if(lockonTicks == 5 && !hasBeeped) {
|
||||
if(this.getIsCritical())
|
||||
worldObj.playSoundAtEntity(this, "hbm:weapon.stingerLockOn", 10F, 0.75F);
|
||||
else
|
||||
worldObj.playSoundAtEntity(this, "hbm:weapon.stingerLockOn", 10F, 1F);
|
||||
hasBeeped = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound p_70014_1_)
|
||||
{
|
||||
p_70014_1_.setShort("xTile", (short)this.field_145791_d);
|
||||
p_70014_1_.setShort("yTile", (short)this.field_145792_e);
|
||||
p_70014_1_.setShort("zTile", (short)this.field_145789_f);
|
||||
p_70014_1_.setShort("life", (short)this.ticksInGround);
|
||||
p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g));
|
||||
p_70014_1_.setByte("inData", (byte)this.inData);
|
||||
p_70014_1_.setByte("shake", (byte)this.arrowShake);
|
||||
p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0));
|
||||
p_70014_1_.setByte("pickup", (byte)this.canBePickedUp);
|
||||
p_70014_1_.setDouble("damage", this.damage);
|
||||
p_70014_1_.setFloat("strength", (byte)this.explosionStrength);
|
||||
p_70014_1_.setByte("type", (byte)this.type);
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound p_70037_1_)
|
||||
{
|
||||
this.field_145791_d = p_70037_1_.getShort("xTile");
|
||||
this.field_145792_e = p_70037_1_.getShort("yTile");
|
||||
this.field_145789_f = p_70037_1_.getShort("zTile");
|
||||
this.ticksInGround = p_70037_1_.getShort("life");
|
||||
this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255);
|
||||
this.inData = p_70037_1_.getByte("inData") & 255;
|
||||
this.arrowShake = p_70037_1_.getByte("shake") & 255;
|
||||
this.inGround = p_70037_1_.getByte("inGround") == 1;
|
||||
this.explosionStrength = p_70037_1_.getFloat("strength");
|
||||
this.type = p_70037_1_.getByte("type");
|
||||
|
||||
if (p_70037_1_.hasKey("damage", 99))
|
||||
{
|
||||
this.damage = p_70037_1_.getDouble("damage");
|
||||
}
|
||||
|
||||
if (p_70037_1_.hasKey("pickup", 99))
|
||||
{
|
||||
this.canBePickedUp = p_70037_1_.getByte("pickup");
|
||||
}
|
||||
else if (p_70037_1_.hasKey("player", 99))
|
||||
{
|
||||
this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by a player entity when they collide with an entity
|
||||
*/
|
||||
@Override
|
||||
public void onCollideWithPlayer(EntityPlayer p_70100_1_)
|
||||
{
|
||||
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0)
|
||||
{
|
||||
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
||||
|
||||
if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_stinger_rocket, 1)))
|
||||
{
|
||||
flag = false;
|
||||
}
|
||||
|
||||
if (flag)
|
||||
{
|
||||
p_70100_1_.onItemPickup(this, 1);
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
|
||||
* prevent them from trampling crops
|
||||
*/
|
||||
@Override
|
||||
protected boolean canTriggerWalking()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getShadowSize()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
public void setDamage(double p_70239_1_)
|
||||
{
|
||||
this.damage = p_70239_1_;
|
||||
}
|
||||
|
||||
public double getDamage()
|
||||
{
|
||||
return this.damage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the amount of knockback the arrow applies when it hits a mob.
|
||||
*/
|
||||
public void setKnockbackStrength(int p_70240_1_)
|
||||
{
|
||||
this.knockbackStrength = p_70240_1_;
|
||||
}
|
||||
|
||||
/**
|
||||
* If returns false, the item will not inflict any damage against entities.
|
||||
*/
|
||||
@Override
|
||||
public boolean canAttackWithItem()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind it.
|
||||
*/
|
||||
public void setIsCritical(boolean p_70243_1_)
|
||||
{
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
|
||||
if (p_70243_1_)
|
||||
{
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the arrow has a stream of critical hit particles flying behind it.
|
||||
*/
|
||||
public boolean getIsCritical()
|
||||
{
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
return (b0 & 1) != 0;
|
||||
}
|
||||
|
||||
public void Explode(int type, float strength) {
|
||||
switch(type) {
|
||||
case 42: ChunkRadiationManager.proxy.incrementRad(worldObj, (int)posX, (int)posY, (int)posZ, 2000);
|
||||
case 0: ExplosionLarge.explode(worldObj, posX, posY, posZ, strength, true, false, true); break;
|
||||
case 1: ExplosionLarge.explode(worldObj, posX, posY, posZ, strength * 2, true, false, true); break;
|
||||
case 2: ExplosionLarge.explodeFire(worldObj, posX, posY, posZ, strength, true, false, false); break;
|
||||
case 4:
|
||||
//ExplosionLarge.explode(worldObj, posX, posY, posZ, strength * 3, false, false, true);
|
||||
ExplosionNukeSmall.explode(worldObj, posX, posY, posZ, ExplosionNukeSmall.PARAMS_MEDIUM);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
68
src/main/java/com/hbm/entity/projectile/EntityTorpedo.java
Normal file
68
src/main/java/com/hbm/entity/projectile/EntityTorpedo.java
Normal file
@ -0,0 +1,68 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityTorpedo extends EntityThrowable {
|
||||
|
||||
public EntityTorpedo(World world) {
|
||||
super(world);
|
||||
this.ignoreFrustumCheck = true;
|
||||
this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(!worldObj.isRemote && this.ticksExisted == 1) {
|
||||
for(int i = 0; i < 15; i++) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "bf");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data,
|
||||
posX + (rand.nextDouble() - 0.5) * 2,
|
||||
posY + (rand.nextDouble() - 0.5) * 1,
|
||||
posZ + (rand.nextDouble() - 0.5) * 2),
|
||||
new TargetPoint(dimension, posX, posY, posZ, 150));
|
||||
}
|
||||
}
|
||||
|
||||
this.lastTickPosX = this.prevPosX = posX;
|
||||
this.lastTickPosY = this.prevPosY = posY;
|
||||
this.lastTickPosZ = this.prevPosZ = posZ;
|
||||
|
||||
this.setPosition(posX + this.motionX, posY + this.motionY, posZ + this.motionZ);
|
||||
|
||||
this.motionY -= 0.04;
|
||||
if(motionY < -2.5) motionY = -2.5;
|
||||
|
||||
if(this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air) {
|
||||
if(!worldObj.isRemote) {
|
||||
this.setDead();
|
||||
ExplosionCreator.composeEffectStandard(worldObj, posX, posY + 1, posZ);
|
||||
ExplosionVNT vnt = new ExplosionVNT(worldObj, posX, posY, posZ, 20F);
|
||||
vnt.makeStandard();
|
||||
vnt.explode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition p_70184_1_) { }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance) {
|
||||
return distance < 25000;
|
||||
}
|
||||
}
|
||||
@ -751,10 +751,7 @@ public class ExplosionChaos {
|
||||
int Z = zz + z;
|
||||
int ZZ = YY + zz * zz;
|
||||
if (ZZ < r22 + world.rand.nextInt(r22 / 2)) {
|
||||
if (world.getBlock(X, Y, Z) != Blocks.bedrock && world.getBlock(X, Y, Z) != ModBlocks.statue_elb
|
||||
&& world.getBlock(X, Y, Z) != ModBlocks.statue_elb_g
|
||||
&& world.getBlock(X, Y, Z) != ModBlocks.statue_elb_w
|
||||
&& world.getBlock(X, Y, Z) != ModBlocks.statue_elb_f)
|
||||
if(world.getBlock(X, Y, Z) != ModBlocks.statue_elb_f)
|
||||
world.setBlock(X, Y, Z, ModBlocks.plasma);
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,12 +228,6 @@ public class BulletConfigSyncingUtil {
|
||||
public static int ROCKET_TOXIC_LASER = i++;
|
||||
public static int ROCKET_PHOSPHORUS_LASER = i++;
|
||||
|
||||
public static int ROCKET_STINGER = i++;
|
||||
public static int ROCKET_STINGER_HE = i++;
|
||||
public static int ROCKET_STINGER_INCENDIARY = i++;
|
||||
public static int ROCKET_STINGER_NUCLEAR = i++;
|
||||
public static int ROCKET_STINGER_BONES = i++;
|
||||
|
||||
public static int SHELL_NORMAL = i++;
|
||||
public static int SHELL_EXPLOSIVE = i++;
|
||||
public static int SHELL_AP = i++;
|
||||
@ -348,12 +342,6 @@ public class BulletConfigSyncingUtil {
|
||||
configSet.put(ROCKET_TOXIC, GunRocketFactory.getRocketChlorineConfig());
|
||||
configSet.put(ROCKET_CANISTER, GunRocketFactory.getRocketCanisterConfig());
|
||||
configSet.put(ROCKET_ERROR, GunRocketFactory.getRocketErrorConfig());
|
||||
|
||||
configSet.put(ROCKET_STINGER, GunRocketHomingFactory.getRocketStingerConfig());
|
||||
configSet.put(ROCKET_STINGER_HE, GunRocketHomingFactory.getRocketStingerHEConfig());
|
||||
configSet.put(ROCKET_STINGER_INCENDIARY, GunRocketHomingFactory.getRocketStingerIncendiaryConfig());
|
||||
configSet.put(ROCKET_STINGER_NUCLEAR, GunRocketHomingFactory.getRocketStingerNuclearConfig());
|
||||
configSet.put(ROCKET_STINGER_BONES, GunRocketHomingFactory.getRocketStingerBonesConfig());
|
||||
|
||||
configSet.put(GRENADE_NORMAL, GunGrenadeFactory.getGrenadeConfig());
|
||||
configSet.put(GRENADE_HE, GunGrenadeFactory.getGrenadeHEConfig());
|
||||
|
||||
@ -1,257 +0,0 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.entity.projectile.EntityRocketHoming;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoStinger;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class GunRocketHomingFactory {
|
||||
|
||||
public static GunConfiguration getStingerConfig() {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 20;
|
||||
config.roundsPerCycle = 1;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.reloadDuration = 20;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 1;
|
||||
config.reloadType = GunConfiguration.RELOAD_SINGLE;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_KRUCK;
|
||||
config.firingSound = "hbm:weapon.rpgShoot";
|
||||
config.reloadSound = GunConfiguration.RSOUND_LAUNCHER;
|
||||
config.reloadSoundEnd = false;
|
||||
|
||||
config.name = "stinger";
|
||||
config.manufacturer = EnumGunManufacturer.RAYTHEON;
|
||||
config.comment.add("Woosh, beep-beep-beep!");
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_STINGER);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_STINGER_HE);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_STINGER_INCENDIARY);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_STINGER_NUCLEAR);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_STINGER_BONES);
|
||||
config.durability = 250;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getSkyStingerConfig() {
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 20;
|
||||
config.roundsPerCycle = 1;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.reloadDuration = 20;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 1;
|
||||
config.reloadType = GunConfiguration.RELOAD_SINGLE;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_KRUCK;
|
||||
config.firingSound = "hbm:weapon.rpgShoot";
|
||||
config.reloadSound = GunConfiguration.RSOUND_LAUNCHER;
|
||||
config.reloadSoundEnd = false;
|
||||
|
||||
config.name = "stingerOneSky";
|
||||
config.manufacturer = EnumGunManufacturer.EQUESTRIA;
|
||||
config.comment.add("Oh, I get it, because of the...nyeees!");
|
||||
config.comment.add("It all makes sense now!");
|
||||
config.comment.add("");
|
||||
config.comment.add("Rockets travel faster, are Three times stronger");
|
||||
config.comment.add("and fires a second rocket for free");
|
||||
config.comment.add("");
|
||||
config.comment.add("[LEGENDARY WEAPON]");
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_STINGER);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_STINGER_HE);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_STINGER_INCENDIARY);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_STINGER_NUCLEAR);
|
||||
config.config.add(BulletConfigSyncingUtil.ROCKET_STINGER_BONES);
|
||||
config.durability = 1000;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketStingerConfig() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.STOCK));
|
||||
bullet.dmgMin = 20;
|
||||
bullet.dmgMax = 25;
|
||||
bullet.explosive = 4F;
|
||||
bullet.trail = 0;
|
||||
|
||||
bullet.bntUpdate = (bulletnt) -> {
|
||||
|
||||
if(!bulletnt.worldObj.isRemote) {
|
||||
|
||||
EntityPlayer player = bulletnt.worldObj.getClosestPlayerToEntity(bulletnt, -1.0D);
|
||||
EntityRocketHoming rocket = new EntityRocketHoming(bulletnt.worldObj, player, 1.0F, 5.0F, 0);
|
||||
if(player.getHeldItem().getItem() == ModItems.gun_skystinger && !player.isSneaking()) {
|
||||
EntityRocketHoming rocket2 = new EntityRocketHoming(bulletnt.worldObj, player, 1.5F, 15.0F, 0);
|
||||
rocket = new EntityRocketHoming(bulletnt.worldObj, player, 1.5F, 15.0F, 0);
|
||||
rocket.setIsCritical(true);
|
||||
rocket2.setIsCritical(true);
|
||||
bulletnt.worldObj.spawnEntityInWorld(rocket2);
|
||||
}
|
||||
rocket.homingMod = 5;
|
||||
rocket.homingRadius = 25;
|
||||
bulletnt.worldObj.spawnEntityInWorld(rocket);
|
||||
bulletnt.setDead();
|
||||
|
||||
}
|
||||
};
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketStingerHEConfig() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.HE));
|
||||
bullet.dmgMin = 30;
|
||||
bullet.dmgMax = 35;
|
||||
bullet.explosive = 8F;
|
||||
bullet.trail = 0;
|
||||
bullet.wear = 15;
|
||||
|
||||
bullet.bntUpdate = (bulletnt) -> {
|
||||
|
||||
if(!bulletnt.worldObj.isRemote) {
|
||||
|
||||
EntityPlayer player = bulletnt.worldObj.getClosestPlayerToEntity(bulletnt, -1.0D);
|
||||
EntityRocketHoming rocket = new EntityRocketHoming(bulletnt.worldObj, player, 1.0F, 5.0F, 1);
|
||||
if(player.getHeldItem().getItem() == ModItems.gun_skystinger && !player.isSneaking()) {
|
||||
EntityRocketHoming rocket2 = new EntityRocketHoming(bulletnt.worldObj, player, 1.5F, 15.0F, 1);
|
||||
rocket = new EntityRocketHoming(bulletnt.worldObj, player, 1.5F, 15.0F, 1);
|
||||
rocket.setIsCritical(true);
|
||||
rocket2.setIsCritical(true);
|
||||
bulletnt.worldObj.spawnEntityInWorld(rocket2);
|
||||
}
|
||||
rocket.homingMod = 5;
|
||||
rocket.homingRadius = 25;
|
||||
bulletnt.worldObj.spawnEntityInWorld(rocket);
|
||||
bulletnt.setDead();
|
||||
|
||||
}
|
||||
};
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketStingerIncendiaryConfig() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.INCENDIARY));
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 20;
|
||||
bullet.explosive = 4F;
|
||||
bullet.trail = 0;
|
||||
bullet.wear = 12;
|
||||
|
||||
bullet.bntUpdate = (bulletnt) -> {
|
||||
|
||||
if(!bulletnt.worldObj.isRemote) {
|
||||
|
||||
EntityPlayer player = bulletnt.worldObj.getClosestPlayerToEntity(bulletnt, -1.0D);
|
||||
EntityRocketHoming rocket = new EntityRocketHoming(bulletnt.worldObj, player, 1.0F, 5.0F, 2);
|
||||
if(player.getHeldItem().getItem() == ModItems.gun_skystinger && !player.isSneaking()) {
|
||||
EntityRocketHoming rocket2 = new EntityRocketHoming(bulletnt.worldObj, player, 1.5F, 15.0F, 2);
|
||||
rocket = new EntityRocketHoming(bulletnt.worldObj, player, 1.5F, 15.0F, 2);
|
||||
rocket.setIsCritical(true);
|
||||
rocket2.setIsCritical(true);
|
||||
bulletnt.worldObj.spawnEntityInWorld(rocket2);
|
||||
}
|
||||
rocket.homingMod = 5;
|
||||
rocket.homingRadius = 25;
|
||||
bulletnt.worldObj.spawnEntityInWorld(rocket);
|
||||
bulletnt.setDead();
|
||||
|
||||
}
|
||||
};
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketStingerNuclearConfig() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.NUCLEAR));
|
||||
bullet.dmgMin = 50;
|
||||
bullet.dmgMax = 55;
|
||||
bullet.explosive = 15F;
|
||||
bullet.trail = 0;
|
||||
bullet.wear = 30;
|
||||
|
||||
bullet.bntUpdate = (bulletnt) -> {
|
||||
|
||||
if(!bulletnt.worldObj.isRemote) {
|
||||
|
||||
EntityPlayer player = bulletnt.worldObj.getClosestPlayerToEntity(bulletnt, -1.0D);
|
||||
|
||||
if(player.getDistanceToEntity(bulletnt) < 16) {
|
||||
EntityRocketHoming rocket = new EntityRocketHoming(bulletnt.worldObj, player, 1.0F, 5.0F, 4);
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.gun_skystinger && !player.isSneaking()) {
|
||||
EntityRocketHoming rocket2 = new EntityRocketHoming(bulletnt.worldObj, player, 1.5F, 15.0F, 4);
|
||||
rocket = new EntityRocketHoming(bulletnt.worldObj, player, 1.5F, 15.0F, 4);
|
||||
rocket.setIsCritical(true);
|
||||
rocket2.setIsCritical(true);
|
||||
bulletnt.worldObj.spawnEntityInWorld(rocket2);
|
||||
}
|
||||
rocket.homingMod = 5;
|
||||
rocket.homingRadius = 25;
|
||||
bulletnt.worldObj.spawnEntityInWorld(rocket);
|
||||
}
|
||||
bulletnt.setDead();
|
||||
|
||||
}
|
||||
};
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getRocketStingerBonesConfig() {
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
|
||||
|
||||
bullet.ammo = new ComparableStack(ModItems.ammo_stinger_rocket.stackFromEnum(AmmoStinger.BONES));
|
||||
bullet.dmgMin = 20;
|
||||
bullet.dmgMax = 25;
|
||||
bullet.explosive = 8F;
|
||||
bullet.trail = 0;
|
||||
|
||||
bullet.bntUpdate = (bulletnt) -> {
|
||||
|
||||
if(!bulletnt.worldObj.isRemote) {
|
||||
|
||||
EntityPlayer player = bulletnt.worldObj.getClosestPlayerToEntity(bulletnt, -1.0D);
|
||||
|
||||
if(player.getDistanceToEntity(bulletnt) < 16) {
|
||||
EntityRocketHoming rocket = new EntityRocketHoming(bulletnt.worldObj, player, 1.0F, 5.0F, 42);
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.gun_skystinger && !player.isSneaking()) {
|
||||
EntityRocketHoming rocket2 = new EntityRocketHoming(bulletnt.worldObj, player, 1.5F, 15.0F, 42);
|
||||
rocket = new EntityRocketHoming(bulletnt.worldObj, player, 1.5F, 15.0F, 42);
|
||||
rocket.setIsCritical(true);
|
||||
rocket2.setIsCritical(true);
|
||||
bulletnt.worldObj.spawnEntityInWorld(rocket2);
|
||||
}
|
||||
rocket.homingMod = 5;
|
||||
rocket.homingRadius = 25;
|
||||
bulletnt.worldObj.spawnEntityInWorld(rocket);
|
||||
}
|
||||
bulletnt.setDead();
|
||||
|
||||
}
|
||||
};
|
||||
return bullet;
|
||||
}
|
||||
}
|
||||
141
src/main/java/com/hbm/inventory/gui/GUIScreenClayTablet.java
Normal file
141
src/main/java/com/hbm/inventory/gui/GUIScreenClayTablet.java
Normal file
@ -0,0 +1,141 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.recipes.PedestalRecipes;
|
||||
import com.hbm.inventory.recipes.PedestalRecipes.PedestalRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIScreenClayTablet extends GuiScreen {
|
||||
|
||||
protected int xSize = 142;
|
||||
protected int ySize = 84;
|
||||
protected int guiLeft;
|
||||
protected int guiTop;
|
||||
|
||||
protected static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/guide_pedestal.png");
|
||||
|
||||
public GUIScreenClayTablet() { }
|
||||
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.guiLeft = (this.width - this.xSize) / 2;
|
||||
this.guiTop = (this.height - this.ySize) / 2;
|
||||
}
|
||||
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
this.drawDefaultBackground();
|
||||
this.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) { }
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if(player.getHeldItem() != null && player.getHeldItem().hasTagCompound() && player.getHeldItem().stackTagCompound.hasKey("tabletSeed") && !PedestalRecipes.recipes.isEmpty()) {
|
||||
Random rand = new Random(player.getHeldItem().stackTagCompound.getLong("tabletSeed"));
|
||||
PedestalRecipe recipe = PedestalRecipes.recipes.get(rand.nextInt(PedestalRecipes.recipes.size()));
|
||||
|
||||
if(recipe.extra == recipe.extra.FULL_MOON) drawTexturedModalRect(guiLeft + 120, guiTop + 62, 142, 32, 16, 16);
|
||||
if(recipe.extra == recipe.extra.NEW_MOON) drawTexturedModalRect(guiLeft + 120, guiTop + 62, 142, 48, 16, 16);
|
||||
if(recipe.extra == recipe.extra.SUN) drawTexturedModalRect(guiLeft + 120, guiTop + 62, 142, 64, 16, 16);
|
||||
|
||||
for(int l = 0; l < 3; l++) {
|
||||
for(int r = 0; r < 3; r++) {
|
||||
if(rand.nextBoolean()) {
|
||||
drawTexturedModalRect(guiLeft + 7 + r * 27, guiTop + 7 + l * 27, 142, 16, 16, 16);
|
||||
} else {
|
||||
|
||||
AStack ingredient = recipe.input[r + l * 3];
|
||||
|
||||
if(ingredient == null) {
|
||||
drawTexturedModalRect(guiLeft + 7 + r * 27, guiTop + 7 + l * 27, 142, 0, 16, 16);
|
||||
continue;
|
||||
}
|
||||
|
||||
List<ItemStack> inputs = ingredient.extractForNEI();
|
||||
ItemStack input = inputs.size() <= 0 ? new ItemStack(ModItems.nothing) : inputs.get((int) (Math.abs(System.currentTimeMillis() / 1000) % inputs.size()));
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
FontRenderer font = null;
|
||||
if(input != null) font = input.getItem().getFontRenderer(recipe.output);
|
||||
if(font == null) font = fontRendererObj;
|
||||
|
||||
itemRender.zLevel = 300.0F;
|
||||
itemRender.renderItemAndEffectIntoGUI(font, this.mc.getTextureManager(), input, guiLeft + 7 + r * 27, guiTop + 7 + l * 27);
|
||||
itemRender.renderItemOverlayIntoGUI(font, this.mc.getTextureManager(), input, guiLeft + 7 + r * 27, guiTop + 7 + l * 27, input.stackSize > 1 ? (input.stackSize + "") : null);
|
||||
itemRender.zLevel = 0.0F;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
this.zLevel = 300.0F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
FontRenderer font = null;
|
||||
if(recipe.output != null) font = recipe.output.getItem().getFontRenderer(recipe.output);
|
||||
if(font == null) font = fontRendererObj;
|
||||
|
||||
itemRender.zLevel = 300.0F;
|
||||
itemRender.renderItemAndEffectIntoGUI(font, this.mc.getTextureManager(), recipe.output, guiLeft + xSize / 2 - 8, guiTop - 20);
|
||||
itemRender.renderItemOverlayIntoGUI(font, this.mc.getTextureManager(), recipe.output, guiLeft + xSize / 2 - 8, guiTop - 20, recipe.output.stackSize > 1 ? (recipe.output.stackSize + "") : null);
|
||||
itemRender.zLevel = 0.0F;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
this.mc.getTextureManager().bindTexture(texture);
|
||||
this.zLevel = 300.0F;
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
String label = recipe.output.getDisplayName();
|
||||
font.drawString(label, guiLeft + (xSize - font.getStringWidth(label)) / 2, guiTop - 30, 0xffffff);
|
||||
|
||||
} else {
|
||||
|
||||
for(int l = 0; l < 3; l++) {
|
||||
for(int r = 0; r < 3; r++) {
|
||||
drawTexturedModalRect(guiLeft + 7 + r * 27, guiTop + 7 + l * 27, 142, 16, 16, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char c, int key) {
|
||||
if(key == 1 || key == this.mc.gameSettings.keyBindInventory.getKeyCode()) {
|
||||
this.mc.thePlayer.closeScreen();
|
||||
}
|
||||
}
|
||||
|
||||
@Override public boolean doesGuiPauseGame() { return false; }
|
||||
}
|
||||
@ -208,7 +208,7 @@ public class Mats {
|
||||
String materialName = name.substring(prefix.length());
|
||||
NTMMaterial material = matByName.get(materialName);
|
||||
|
||||
if(material != null) {
|
||||
if(material != null && (material.smeltable == SmeltingBehavior.SMELTABLE || material.smeltable == SmeltingBehavior.ADDITIVE)) {
|
||||
list.add(new MaterialStack(material, prefixEntry.getValue().q(1)));
|
||||
break outer;
|
||||
}
|
||||
|
||||
@ -197,15 +197,15 @@ public class AmmoPressRecipes extends SerializableRecipe {
|
||||
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.G12_BP, 6),
|
||||
null, nugget.copy(6), null,
|
||||
null, smokeless, null,
|
||||
null, smokeful, null,
|
||||
null, bpShell, null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.G12_BP_MAGNUM, 6),
|
||||
null, nugget.copy(8), null,
|
||||
null, smokeless, null,
|
||||
null, smokeful, null,
|
||||
null, bpShell, null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.G12_BP_SLUG, 6),
|
||||
null, lead, null,
|
||||
null, smokeless, null,
|
||||
null, smokeful, null,
|
||||
null, bpShell, null));
|
||||
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.G12, 6),
|
||||
|
||||
@ -35,6 +35,7 @@ import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
|
||||
import com.hbm.items.machine.ItemDrillbit.EnumDrillType;
|
||||
import com.hbm.items.machine.ItemPistons.EnumPistonType;
|
||||
import com.hbm.items.weapon.ItemAmmoHIMARS;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
@ -169,9 +170,6 @@ public class AssemblerRecipes extends SerializableRecipe {
|
||||
makeRecipe(new ComparableStack(ModBlocks.therm_endo, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.powder_ice, 32), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.coil_gold, 4), },250);
|
||||
makeRecipe(new ComparableStack(ModBlocks.therm_exo, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new OreDictStack(P_RED.dust(), 32), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.coil_gold, 4), },250);
|
||||
makeRecipe(new ComparableStack(ModItems.spawn_chopper, 1), new AStack[] {new ComparableStack(ModItems.chopper_blades, 5), new ComparableStack(ModItems.chopper_gun, 1), new ComparableStack(ModItems.chopper_head, 1), new ComparableStack(ModItems.chopper_tail, 1), new ComparableStack(ModItems.chopper_torso, 1), new ComparableStack(ModItems.chopper_wing, 2), },300);
|
||||
makeRecipe(new ComparableStack(ModItems.gun_defabricator, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(IRON.plate(), 5), new ComparableStack(ModItems.mechanism_special, 3), new ComparableStack(Items.diamond, 1), new ComparableStack(ModItems.plate_dalekanium, 3), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.gun_osipr_ammo, 24), new AStack[] {new OreDictStack(STEEL.plate(), 2), new OreDictStack(REDSTONE.dust(), 1), new ComparableStack(Items.glowstone_dust, 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.gun_osipr_ammo2, 1), new AStack[] {new OreDictStack(CMB.plate(), 4), new OreDictStack(REDSTONE.dust(), 7), new ComparableStack(ModItems.powder_power, 3), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_fire, 1), new AStack[] {new ComparableStack(ModItems.grenade_frag, 1), new OreDictStack(P_RED.dust(), 1), new OreDictStack(CU.plate(), 2), },150);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_shrapnel, 1), new AStack[] {new ComparableStack(ModItems.grenade_frag, 1), new ComparableStack(ModItems.pellet_buckshot, 1), new OreDictStack(STEEL.plate(), 2), },150);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_cluster, 1), new AStack[] {new ComparableStack(ModItems.grenade_frag, 1), new ComparableStack(ModItems.pellet_cluster, 1), new OreDictStack(STEEL.plate(), 2), },200);
|
||||
@ -179,7 +177,7 @@ public class AssemblerRecipes extends SerializableRecipe {
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_electric, 1), new AStack[] {new ComparableStack(ModItems.grenade_generic, 1), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CAPACITOR.ordinal()), new OreDictStack(GOLD.plate(), 2), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_pulse, 4), new AStack[] {new OreDictStack(STEEL.plate(), 1), new OreDictStack(IRON.plate(), 3), new OreDictStack(MINGRADE.wireFine(), 6), new ComparableStack(Items.diamond, 1), },300);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_plasma, 2), new AStack[] {new OreDictStack(STEEL.plate(), 3), new OreDictStack(ALLOY.plate(), 1), new ComparableStack(ModItems.coil_advanced_torus, 1), new ComparableStack(ModItems.cell_deuterium, 1), new ComparableStack(ModItems.cell_tritium, 1), },300);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_tau, 2), new AStack[] {new OreDictStack(PB.plate(), 3), new OreDictStack(ALLOY.plate(), 1), new ComparableStack(ModItems.coil_advanced_torus, 1), new ComparableStack(ModItems.gun_xvl1456_ammo, 1), },300);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_tau, 2), new AStack[] {new OreDictStack(PB.plate(), 3), new OreDictStack(ALLOY.plate(), 1), new ComparableStack(ModItems.coil_advanced_torus, 1), new ComparableStack(ModItems.ammo_standard, 1, EnumAmmo.TAU_URANIUM), },300);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_schrabidium, 1), new AStack[] {new ComparableStack(ModItems.grenade_flare, 1), new OreDictStack(SA326.dust(), 1), new OreDictStack(OreDictManager.getReflector(), 2), },300);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_nuclear, 1), new AStack[] {new OreDictStack(IRON.plate(), 1), new OreDictStack(STEEL.plate(), 1), new OreDictStack(PU239.nugget(), 2), new OreDictStack(MINGRADE.wireFine(), 2), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_zomg, 1), new AStack[] {new ComparableStack(ModItems.plate_paa, 3), new OreDictStack(OreDictManager.getReflector(), 1), new ComparableStack(ModItems.coil_magnetized_tungsten, 3), new ComparableStack(ModItems.powder_power, 3), },300);
|
||||
@ -585,17 +583,6 @@ public class AssemblerRecipes extends SerializableRecipe {
|
||||
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)
|
||||
}, 600);
|
||||
|
||||
makeRecipe(new ComparableStack(ModItems.gun_zomg, 1), new AStack[] {
|
||||
new ComparableStack(ModItems.crystal_xen, 2),
|
||||
new ComparableStack(ModItems.singularity_counter_resonant, 1),
|
||||
new ComparableStack(ModItems.mechanism_special, 3),
|
||||
new ComparableStack(ModItems.plate_paa, 12),
|
||||
new OreDictStack(OreDictManager.getReflector(), 8),
|
||||
new ComparableStack(ModItems.coil_magnetized_tungsten, 5),
|
||||
new ComparableStack(ModItems.powder_magic, 4),
|
||||
new OreDictStack(ASBESTOS.ingot(), 8)
|
||||
}, 200);
|
||||
|
||||
makeRecipe(new ComparableStack(ModItems.ammo_75bolt, 2, ItemAmmoEnums.Ammo75Bolt.STOCK.ordinal()), new AStack[] {
|
||||
new OreDictStack(STEEL.plate(), 4),
|
||||
new OreDictStack(ANY_PLASTICEXPLOSIVE.ingot(), 2),
|
||||
|
||||
155
src/main/java/com/hbm/inventory/recipes/PedestalRecipes.java
Normal file
155
src/main/java/com/hbm/inventory/recipes/PedestalRecipes.java
Normal file
@ -0,0 +1,155 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ItemEnums.EnumSecretType;
|
||||
import com.hbm.items.food.ItemConserve.EnumFoodType;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class PedestalRecipes extends SerializableRecipe {
|
||||
|
||||
public static List<PedestalRecipe> recipes = new ArrayList();
|
||||
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
|
||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_light_revolver_dani),
|
||||
null, new OreDictStack(PB.plate()), null,
|
||||
new OreDictStack(GOLD.plate()), new ComparableStack(ModItems.gun_light_revolver), new OreDictStack(GOLD.plate()),
|
||||
null, new OreDictStack(PB.plate()), null));
|
||||
|
||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_maresleg_broken),
|
||||
new ComparableStack(ModBlocks.barbed_wire), new OreDictStack(WEAPONSTEEL.plate()), new ComparableStack(ModBlocks.barbed_wire),
|
||||
new OreDictStack(WEAPONSTEEL.plate()), new ComparableStack(ModItems.gun_maresleg), new OreDictStack(WEAPONSTEEL.plate()),
|
||||
new ComparableStack(ModBlocks.barbed_wire), new OreDictStack(WEAPONSTEEL.plate()), new ComparableStack(ModBlocks.barbed_wire)));
|
||||
|
||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_heavy_revolver_lilmac),
|
||||
new OreDictStack(WEAPONSTEEL.plate()), new OreDictStack(DIAMOND.gem()), new OreDictStack(WEAPONSTEEL.plate()),
|
||||
new ComparableStack(ModItems.powder_magic), new ComparableStack(ModItems.gun_heavy_revolver), null,
|
||||
null, new OreDictStack(BONE.grip()), new ComparableStack(Items.apple, 3)));
|
||||
|
||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_heavy_revolver_protege),
|
||||
new ComparableStack(ModBlocks.chain, 16), new OreDictStack(CINNABAR.gem()), new ComparableStack(ModBlocks.chain, 16),
|
||||
new ComparableStack(ModItems.scrap_nuclear), new ComparableStack(ModItems.gun_heavy_revolver), new ComparableStack(ModItems.scrap_nuclear),
|
||||
new ComparableStack(ModBlocks.chain, 16), new OreDictStack(CINNABAR.gem()), new ComparableStack(ModBlocks.chain, 16)));
|
||||
|
||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_flamer_daybreaker),
|
||||
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.canned_conserve, 1, EnumFoodType.JIZZ), new OreDictStack(GOLD.plateCast()),
|
||||
new OreDictStack(P_WHITE.ingot()), new ComparableStack(ModItems.gun_flamer), new OreDictStack(P_WHITE.ingot()),
|
||||
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.stick_dynamite), new OreDictStack(GOLD.plateCast()))
|
||||
.extra(PedestalExtraCondition.SUN));
|
||||
|
||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_autoshotgun_sexy),
|
||||
new ComparableStack(ModItems.bolt_spike, 16), new OreDictStack(STAR.ingot(), 4), new ComparableStack(ModItems.bolt_spike, 16),
|
||||
new ComparableStack(ModItems.card_qos), new ComparableStack(ModItems.gun_autoshotgun), new ComparableStack(ModItems.card_aos),
|
||||
new ComparableStack(ModItems.bolt_spike, 16), new OreDictStack(STAR.ingot(), 4), new ComparableStack(ModItems.bolt_spike, 16)));
|
||||
|
||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_minigun_lacunae),
|
||||
null, new ComparableStack(ModItems.powder_magic, 4), null,
|
||||
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL), new ComparableStack(ModItems.gun_minigun), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL),
|
||||
null, new ComparableStack(ModItems.powder_magic, 4), null)
|
||||
.extra(PedestalExtraCondition.FULL_MOON));
|
||||
|
||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_folly),
|
||||
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL), new ComparableStack(ModItems.item_secret, 2, EnumSecretType.CONTROLLER), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL),
|
||||
new OreDictStack(BSCCO.ingot(), 16), new OreDictStack(STAR.block(), 64), new OreDictStack(BSCCO.ingot(), 16),
|
||||
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL), new ComparableStack(ModItems.item_secret, 2, EnumSecretType.CONTROLLER), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL))
|
||||
.extra(PedestalExtraCondition.FULL_MOON));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return "hbmPedestal.json";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getRecipeObject() {
|
||||
return recipes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRecipes() {
|
||||
recipes.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readRecipe(JsonElement recipe) {
|
||||
JsonObject obj = (JsonObject) recipe;
|
||||
|
||||
ItemStack output = this.readItemStack(obj.get("output").getAsJsonArray());
|
||||
JsonArray inputArray = obj.get("input").getAsJsonArray();
|
||||
AStack[] input = new AStack[9];
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
JsonElement element = inputArray.get(i);
|
||||
if(element.isJsonNull()) {
|
||||
input[i] = null;
|
||||
} else {
|
||||
input[i] = this.readAStack(element.getAsJsonArray());
|
||||
}
|
||||
}
|
||||
|
||||
PedestalRecipe rec = new PedestalRecipe(output, input);
|
||||
if(obj.has("extra")) {
|
||||
rec.extra = PedestalExtraCondition.valueOf(obj.get("extra").getAsString());
|
||||
}
|
||||
|
||||
this.recipes.add(rec);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
|
||||
PedestalRecipe rec = (PedestalRecipe) recipe;
|
||||
|
||||
writer.name("output");
|
||||
this.writeItemStack(rec.output, writer);
|
||||
|
||||
writer.name("input").beginArray();
|
||||
for(int i = 0; i < rec.input.length; i++) {
|
||||
if(rec.input[i] == null) {
|
||||
writer.nullValue();
|
||||
} else {
|
||||
this.writeAStack(rec.input[i], writer);
|
||||
}
|
||||
}
|
||||
writer.endArray();
|
||||
|
||||
writer.name("extra").value(rec.extra.name());
|
||||
}
|
||||
|
||||
public static enum PedestalExtraCondition {
|
||||
NONE, FULL_MOON, NEW_MOON, SUN
|
||||
}
|
||||
|
||||
public static class PedestalRecipe {
|
||||
public ItemStack output;
|
||||
public AStack[] input;
|
||||
public PedestalExtraCondition extra = PedestalExtraCondition.NONE;
|
||||
|
||||
public PedestalRecipe(ItemStack output, AStack... input) {
|
||||
this.output = output;
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
public PedestalRecipe extra(PedestalExtraCondition extra) {
|
||||
this.extra = extra;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -75,6 +75,7 @@ public abstract class SerializableRecipe {
|
||||
recipeHandlers.add(new ExposureChamberRecipes());
|
||||
recipeHandlers.add(new AmmoPressRecipes());
|
||||
recipeHandlers.add(new AssemblerRecipes());
|
||||
recipeHandlers.add(new PedestalRecipes());
|
||||
|
||||
recipeHandlers.add(new MatDistribution());
|
||||
recipeHandlers.add(new CustomMachineRecipes());
|
||||
|
||||
@ -47,7 +47,7 @@ public class ItemPoolsLegacy {
|
||||
weighted(ModItems.ammo_standard, EnumAmmo.G12_BP.ordinal(), 3, 6, 3),
|
||||
weighted(ModItems.ammo_standard, EnumAmmo.G26_FLARE_SUPPLY.ordinal(), 1, 1, 1),
|
||||
weighted(ModItems.gun_kit_1, 0, 1, 3, 4),
|
||||
weighted(ModItems.gun_lever_action, 0, 1, 1, 1),
|
||||
weighted(ModItems.gun_maresleg, 0, 1, 1, 1),
|
||||
weighted(ModItems.casing_9, 0, 4, 10, 3),
|
||||
weighted(ModItems.casing_50, 0, 4, 10, 3),
|
||||
weighted(ModItems.cordite, 0, 4, 6, 5),
|
||||
|
||||
@ -37,7 +37,6 @@ public class ItemPoolsRedRoom {
|
||||
weighted(ModItems.flask_infusion, 0, 1, 1, 5),
|
||||
weighted(ModBlocks.boxcar, 0, 1, 1, 5),
|
||||
weighted(ModItems.book_of_, 0, 1, 1, 5),
|
||||
weighted(ModItems.gun_revolver_pip, 0, 1, 1, 5)
|
||||
};
|
||||
}};
|
||||
|
||||
|
||||
@ -42,9 +42,9 @@ public class ItemPoolsSingle {
|
||||
new ItemPool(POOL_VAULT_RUSTY) {{
|
||||
this.pool = new WeightedRandomChestContent[] {
|
||||
weighted(Items.gold_ingot, 0, 3, 14, 1),
|
||||
weighted(ModItems.gun_uac_pistol, 0, 1, 1, 2),
|
||||
weighted(ModItems.gun_heavy_revolver, 0, 1, 1, 2),
|
||||
weighted(ModItems.pin, 0, 8, 8, 1),
|
||||
weighted(ModItems.gun_calamity, 0, 1, 1, 1),
|
||||
weighted(ModItems.gun_am180, 0, 1, 1, 1),
|
||||
weighted(ModItems.bottle_quantum, 0, 1, 3, 1),
|
||||
weighted(ModItems.ingot_advanced_alloy, 0, 4, 12, 1),
|
||||
weighted(ModItems.ammo_standard, EnumAmmo.BMG50_FMJ.ordinal(), 24, 48, 1),
|
||||
@ -69,7 +69,6 @@ public class ItemPoolsSingle {
|
||||
weighted(ModItems.grenade_smart, 0, 1, 6, 1),
|
||||
weighted(ModItems.powder_yellowcake, 0, 16, 24, 1),
|
||||
weighted(ModItems.gun_uzi, 0, 1, 1, 1),
|
||||
weighted(ModItems.gun_uzi_silencer, 0, 1, 1, 1),
|
||||
weighted(ModItems.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 12, 16, 1),
|
||||
weighted(ModItems.circuit, EnumCircuitType.CHIP.ordinal(), 2, 6, 1)
|
||||
};
|
||||
@ -89,7 +88,7 @@ public class ItemPoolsSingle {
|
||||
weighted(ModItems.grenade_mirv, 0, 1, 1, 1),
|
||||
weighted(ModItems.powder_yellowcake, 0, 26, 42, 1),
|
||||
weighted(ModItems.ingot_u235, 0, 3, 6, 1),
|
||||
weighted(ModItems.gun_revolver_pip, 0, 1, 1, 1),
|
||||
weighted(ModItems.gun_heavy_revolver, 0, 1, 1, 1),
|
||||
weighted(ModItems.circuit, EnumCircuitType.CHIP.ordinal(), 18, 32, 1),
|
||||
weighted(ModItems.circuit, EnumCircuitType.BASIC.ordinal(), 6, 12, 1)
|
||||
};
|
||||
@ -99,8 +98,8 @@ public class ItemPoolsSingle {
|
||||
this.pool = new WeightedRandomChestContent[] {
|
||||
weighted(ModItems.ammo_container, 0, 3, 6, 1),
|
||||
weighted(ModItems.ammo_standard, EnumAmmo.NUKE_DEMO.ordinal(), 2, 3, 1),
|
||||
weighted(ModItems.gun_mirv, 0, 1, 1, 1),
|
||||
weighted(ModItems.gun_proto, 0, 1, 1, 1),
|
||||
weighted(ModItems.gun_carbine, 0, 1, 1, 1),
|
||||
weighted(ModItems.gun_congolake, 0, 1, 1, 1),
|
||||
weighted(ModItems.gun_b92, 0, 1, 1, 1),
|
||||
weighted(ModItems.ingot_combine_steel, 0, 16, 28, 1),
|
||||
weighted(ModItems.man_core, 0, 1, 1, 1),
|
||||
|
||||
@ -1535,8 +1535,6 @@ public class ModItems {
|
||||
public static Item gun_bolt_action_green;
|
||||
public static Item gun_bolt_action_saturnite;
|
||||
public static Item gun_mymy;
|
||||
public static Item gun_b92;
|
||||
public static Item gun_b92_ammo;
|
||||
public static Item gun_b93;
|
||||
public static Item gun_xvl1456;
|
||||
public static Item gun_xvl1456_ammo;
|
||||
@ -1546,9 +1544,6 @@ public class ModItems {
|
||||
public static Item gun_immolator;
|
||||
public static Item gun_immolator_ammo;
|
||||
public static Item gun_cryolator;
|
||||
public static Item gun_cryocannon;
|
||||
public static Item gun_cryolator_ammo;
|
||||
public static Item gun_fireext;
|
||||
public static Item gun_mp;
|
||||
public static Item gun_bolter_digamma;
|
||||
public static Item gun_zomg;
|
||||
@ -1573,6 +1568,12 @@ public class ModItems {
|
||||
public static Item gun_glass_cannon;
|
||||
public static Item gun_lunatic_marksman;
|
||||
public static Item gun_uac_pistol;
|
||||
|
||||
public static Item gun_b92;
|
||||
public static Item gun_b92_ammo;
|
||||
public static Item gun_cryocannon;
|
||||
public static Item gun_cryolator_ammo;
|
||||
public static Item gun_fireext;
|
||||
|
||||
public static Item gun_debug;
|
||||
public static Item ammo_debug;
|
||||
@ -1589,6 +1590,7 @@ public class ModItems {
|
||||
public static Item gun_flaregun;
|
||||
public static Item gun_heavy_revolver;
|
||||
public static Item gun_heavy_revolver_lilmac;
|
||||
public static Item gun_heavy_revolver_protege;
|
||||
public static Item gun_carbine;
|
||||
public static Item gun_am180;
|
||||
public static Item gun_liberator;
|
||||
@ -2312,6 +2314,7 @@ public class ModItems {
|
||||
public static Item book_lore;
|
||||
public static Item holotape_image;
|
||||
public static Item holotape_damaged;
|
||||
public static Item clay_tablet;
|
||||
|
||||
public static Item polaroid;
|
||||
public static Item glitch;
|
||||
@ -3982,7 +3985,7 @@ public class ModItems {
|
||||
ammo_22lr = new ItemAmmo(Ammo22LR.class).setUnlocalizedName("ammo_22lr");
|
||||
ammo_rocket = new ItemAmmo(AmmoRocket.class).setUnlocalizedName("ammo_rocket");
|
||||
ammo_grenade = new ItemAmmo(AmmoGrenade.class).setUnlocalizedName("ammo_grenade");
|
||||
ammo_shell = new ItemAmmo(Ammo240Shell.class).setUnlocalizedName("ammo_shell");
|
||||
ammo_shell = (ItemEnumMulti) new ItemAmmo(Ammo240Shell.class).setCreativeTab(MainRegistry.weaponTab).setUnlocalizedName("ammo_shell");
|
||||
ammo_dgk = new ItemCustomLore().setUnlocalizedName("ammo_dgk").setCreativeTab(MainRegistry.weaponTab);
|
||||
ammo_nuke = new ItemAmmo(AmmoFatman.class).setUnlocalizedName("ammo_nuke");
|
||||
ammo_fuel = new ItemAmmo(AmmoFlamethrower.class).setUnlocalizedName("ammo_fuel");
|
||||
@ -4070,7 +4073,7 @@ public class ModItems {
|
||||
gun_defabricator_ammo = new Item().setUnlocalizedName("gun_defabricator_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_defabricator_ammo");
|
||||
gun_defabricator = new Item().setUnlocalizedName("gun_defabricator").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_defabricator");
|
||||
gun_vortex = new Item().setUnlocalizedName("gun_vortex").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_vortex");
|
||||
gun_super_shotgun = new Item().setUnlocalizedName("gun_super_shotgun").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_super_shotgun");
|
||||
gun_super_shotgun = new Item().setUnlocalizedName("gun_super_shotgun").setMaxStackSize(1).setFull3D().setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_super_shotgun");
|
||||
gun_moist_nugget = new Item().setUnlocalizedName("gun_moist_nugget").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_moist_nugget");
|
||||
gun_darter = new Item().setFull3D().setUnlocalizedName("gun_darter").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
gun_glass_cannon = new Item().setFull3D().setUnlocalizedName("gun_glass_cannon").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
@ -5216,6 +5219,7 @@ public class ModItems {
|
||||
book_lore = new ItemBookLore().setUnlocalizedName("book_lore").setCreativeTab(null).setTextureName(RefStrings.MODID + ":book_pages");
|
||||
holotape_image = new ItemHolotapeImage().setUnlocalizedName("holotape_image").setCreativeTab(null).setTextureName(RefStrings.MODID + ":holotape");
|
||||
holotape_damaged = new Item().setUnlocalizedName("holotape_damaged").setCreativeTab(null).setTextureName(RefStrings.MODID + ":holotape_damaged");
|
||||
clay_tablet = new ItemClayTablet().setUnlocalizedName("clay_tablet").setCreativeTab(null).setTextureName(RefStrings.MODID + ":clay_tablet");
|
||||
|
||||
polaroid = new ItemPolaroid().setUnlocalizedName("polaroid").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":polaroid_" + MainRegistry.polaroidID);
|
||||
glitch = new ItemGlitch().setUnlocalizedName("glitch").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":glitch_" + MainRegistry.polaroidID);
|
||||
@ -6808,6 +6812,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_flaregun, gun_flaregun.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_heavy_revolver, gun_heavy_revolver.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_heavy_revolver_lilmac, gun_heavy_revolver_lilmac.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_heavy_revolver_protege, gun_heavy_revolver_protege.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_carbine, gun_carbine.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_am180, gun_am180.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_liberator, gun_liberator.getUnlocalizedName());
|
||||
@ -7581,6 +7586,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(book_lore, book_lore.getUnlocalizedName());
|
||||
GameRegistry.registerItem(holotape_image, holotape_image.getUnlocalizedName());
|
||||
GameRegistry.registerItem(holotape_damaged, holotape_damaged.getUnlocalizedName());
|
||||
GameRegistry.registerItem(clay_tablet, clay_tablet.getUnlocalizedName());
|
||||
|
||||
//Technical Items
|
||||
GameRegistry.registerItem(b_smoke1, b_smoke1.getUnlocalizedName());
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.render.model.ModelArmorTrenchmaster;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -12,7 +11,6 @@ import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
|
||||
@ -44,8 +42,8 @@ public class ArmorTrenchmaster extends ArmorFSB {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
super.addInformation(stack, player, list, ext);
|
||||
|
||||
list.add(EnumChatFormatting.RED + " " + I18nUtil.resolveKey("armor.fasterReload"));
|
||||
list.add(EnumChatFormatting.RED + " " + I18nUtil.resolveKey("armor.moreAmmo"));
|
||||
//list.add(EnumChatFormatting.RED + " " + I18nUtil.resolveKey("armor.fasterReload"));
|
||||
//list.add(EnumChatFormatting.RED + " " + I18nUtil.resolveKey("armor.moreAmmo"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
package com.hbm.items.food;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemNugget extends ItemFood {
|
||||
|
||||
public ItemNugget(int p_i45340_1_, boolean p_i45340_2_) {
|
||||
super(p_i45340_1_, p_i45340_2_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if (this == ModItems.gun_moist_nugget) {
|
||||
list.add("A Mosin-Na...no wait, it's");
|
||||
list.add("just a moist nugget.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
39
src/main/java/com/hbm/items/special/ItemClayTablet.java
Normal file
39
src/main/java/com/hbm/items/special/ItemClayTablet.java
Normal file
@ -0,0 +1,39 @@
|
||||
package com.hbm.items.special;
|
||||
|
||||
import com.hbm.inventory.gui.GUIScreenClayTablet;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemClayTablet extends Item implements IGUIProvider {
|
||||
|
||||
public ItemClayTablet() {
|
||||
this.setMaxDamage(0);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if(!world.isRemote && !stack.hasTagCompound()) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
stack.stackTagCompound.setLong("tabletSeed", player.getRNG().nextLong());
|
||||
}
|
||||
if(world.isRemote) player.openGui(MainRegistry.instance, 0, world, 0, 0, 0);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; }
|
||||
|
||||
@Override @SideOnly(Side.CLIENT)
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIScreenClayTablet();
|
||||
}
|
||||
}
|
||||
@ -92,7 +92,7 @@ public class ItemGlitch extends Item implements IBatteryItem {
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_pip));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_heavy_revolver_lilmac));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.bottle_sparkle));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.geiger_counter));
|
||||
player.addChatMessage(new ChatComponentText("Have some free stuff. You'll need it for that one cryptic achievement."));
|
||||
|
||||
@ -463,9 +463,7 @@ public class ItemStarterKit extends Item {
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.euphemium_plate, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.euphemium_legs, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.euphemium_boots, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.statue_elb), 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_cursed, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.watch, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.statue_elb_f), 1));
|
||||
}
|
||||
|
||||
if(this == ModItems.hazmat_kit)
|
||||
|
||||
@ -37,16 +37,13 @@ public class ItemSurveyScanner extends Item {
|
||||
|
||||
Block block = world.getBlock(x + a * 5, i, z + b * 5);
|
||||
|
||||
if(block == ModBlocks.ore_oil)
|
||||
hasOil = true;
|
||||
else if(block == ModBlocks.ore_coltan)
|
||||
hasColtan = true;
|
||||
else if(block == ModBlocks.stone_depth)
|
||||
hasDepth = true;
|
||||
else if(block == ModBlocks.stone_gneiss)
|
||||
hasSchist = true;
|
||||
else if(block == ModBlocks.ore_australium)
|
||||
hasAussie = true;
|
||||
//wow, this sucks!
|
||||
if(block == ModBlocks.ore_oil) hasOil = true;
|
||||
else if(block == ModBlocks.ore_coltan) hasColtan = true;
|
||||
else if(block == ModBlocks.stone_depth) hasDepth = true;
|
||||
else if(block == ModBlocks.stone_depth_nether) hasDepth = true;
|
||||
else if(block == ModBlocks.stone_gneiss) hasSchist = true;
|
||||
else if(block == ModBlocks.ore_australium) hasAussie = true;
|
||||
}
|
||||
|
||||
Block block = world.getBlock(x + a * 2, 0, z + b * 2);
|
||||
@ -57,18 +54,12 @@ public class ItemSurveyScanner extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
if(hasOil)
|
||||
player.addChatComponentMessage(new ChatComponentText("Found OIL!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.BLACK)));
|
||||
if(hasColtan)
|
||||
player.addChatComponentMessage(new ChatComponentText("Found COLTAN!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GOLD)));
|
||||
if(hasDepth)
|
||||
player.addChatComponentMessage(new ChatComponentText("Found DEPTH ROCK!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GRAY)));
|
||||
if(hasSchist)
|
||||
player.addChatComponentMessage(new ChatComponentText("Found SCHIST!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.DARK_AQUA)));
|
||||
if(hasAussie)
|
||||
player.addChatComponentMessage(new ChatComponentText("Found AUSTRALIUM!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
if(tile != null && tile.resource != null)
|
||||
player.addChatComponentMessage(new ChatComponentText("Found BEDROCK ORE for " + tile.resource.getDisplayName() + "!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
if(hasOil) player.addChatComponentMessage(new ChatComponentText("Found OIL!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.BLACK)));
|
||||
if(hasColtan) player.addChatComponentMessage(new ChatComponentText("Found COLTAN!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GOLD)));
|
||||
if(hasDepth) player.addChatComponentMessage(new ChatComponentText("Found DEPTH ROCK!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GRAY)));
|
||||
if(hasSchist) player.addChatComponentMessage(new ChatComponentText("Found SCHIST!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.DARK_AQUA)));
|
||||
if(hasAussie) player.addChatComponentMessage(new ChatComponentText("Found AUSTRALIUM!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
if(tile != null && tile.resource != null) player.addChatComponentMessage(new ChatComponentText("Found BEDROCK ORE for " + tile.resource.getDisplayName() + "!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
}
|
||||
|
||||
player.swingItem();
|
||||
|
||||
@ -26,7 +26,6 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSourceIndirect;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.WorldServer;
|
||||
@ -145,8 +144,8 @@ public class BulletConfig implements Cloneable {
|
||||
|
||||
DamageSource dmg;
|
||||
|
||||
if(shooter != null) dmg = new EntityDamageSourceIndirect(dmgClass.name(), projectile, shooter);
|
||||
else dmg = new DamageSource(dmgClass.name());
|
||||
if(shooter != null) dmg = new DamageSourceSednaWithAttacker(dmgClass.name(), projectile, shooter);
|
||||
else dmg = new DamageSourceSednaNoAttacker(dmgClass.name());
|
||||
|
||||
switch(dmgClass) {
|
||||
case PHYSICAL: dmg.setProjectile(); break;
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package com.hbm.items.weapon.sedna;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
|
||||
public class DamageSourceSednaNoAttacker extends DamageSource {
|
||||
|
||||
public DamageSourceSednaNoAttacker(String type) {
|
||||
super(type.toLowerCase(Locale.US));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent func_151519_b(EntityLivingBase died) {
|
||||
IChatComponent diedName = died.func_145748_c_();
|
||||
return new ChatComponentTranslation("death.sedna." + this.damageType, diedName);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.hbm.items.weapon.sedna;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
|
||||
public class DamageSourceSednaWithAttacker extends DamageSourceSednaNoAttacker {
|
||||
|
||||
public Entity projectile;
|
||||
public Entity shooter;
|
||||
|
||||
public DamageSourceSednaWithAttacker(String type, Entity projectile, Entity shooter) {
|
||||
super(type.toLowerCase(Locale.US));
|
||||
this.projectile = projectile;
|
||||
this.shooter = shooter;
|
||||
}
|
||||
|
||||
@Override public Entity getSourceOfDamage() { return this.projectile; } //what even uses this, except for the wackass "shot by bullet" death messages?
|
||||
@Override public Entity getEntity() { return this.shooter; }
|
||||
|
||||
@Override
|
||||
public IChatComponent func_151519_b(EntityLivingBase died) {
|
||||
IChatComponent diedName = died.func_145748_c_();
|
||||
IChatComponent shooterName = shooter != null ? shooter.func_145748_c_() : new ChatComponentText("Unknown").setChatStyle(new ChatStyle().setObfuscated(true));
|
||||
return new ChatComponentTranslation("death.sedna." + this.damageType + ".attacker", diedName, shooterName);
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.particle.helper.AshesCreator;
|
||||
@ -16,8 +18,8 @@ public class ConfettiUtil {
|
||||
|
||||
public static void decideConfetti(EntityLivingBase entity, DamageSource source) {
|
||||
if(entity.isEntityAlive()) return;
|
||||
if(source.damageType.equals(DamageClass.LASER.name())) pulverize(entity);
|
||||
if(source.damageType.equals(DamageClass.ELECTRIC.name())) pulverize(entity);
|
||||
if(source.damageType.equals(DamageClass.LASER.name().toLowerCase(Locale.US))) pulverize(entity);
|
||||
if(source.damageType.equals(DamageClass.ELECTRIC.name().toLowerCase(Locale.US))) pulverize(entity);
|
||||
if(source.isExplosion()) gib(entity);
|
||||
if(source.isFireDamage()) cremate(entity);
|
||||
}
|
||||
|
||||
@ -48,6 +48,7 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flaregun, new ItemRenderFlaregun());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_heavy_revolver, new ItemRenderHeavyRevolver(ResourceManager.heavy_revolver_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_heavy_revolver_lilmac, new ItemRenderHeavyRevolver(ResourceManager.lilmac_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_heavy_revolver_protege, new ItemRenderHeavyRevolver(ResourceManager.heavy_revolver_protege_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_carbine, new ItemRenderCarbine());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_am180, new ItemRenderAm180());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_liberator, new ItemRenderLiberator());
|
||||
@ -101,7 +102,8 @@ public class GunFactoryClient {
|
||||
m44_jhp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
m44_ap.setRenderer(LegoClient.RENDER_AP_BULLET);
|
||||
m44_express.setRenderer(LegoClient.RENDER_EXPRESS_BULLET);
|
||||
m44_equestrian.setRenderer(LegoClient.RENDER_LEGENDARY_BULLET);
|
||||
m44_equestrian_pip.setRenderer(LegoClient.RENDER_LEGENDARY_BULLET);
|
||||
m44_equestrian_mn7.setRenderer(LegoClient.RENDER_LEGENDARY_BULLET);
|
||||
|
||||
p22_sp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
p22_fmj.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
@ -144,7 +146,8 @@ public class GunFactoryClient {
|
||||
g12_explosive.setRenderer(LegoClient.RENDER_EXPRESS_BULLET);
|
||||
g12_phosphorus.setRenderer(LegoClient.RENDER_AP_BULLET);
|
||||
//g12_anthrax.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_equestrian.setRenderer(LegoClient.RENDER_LEGENDARY_BULLET);
|
||||
g12_equestrian_bj.setRenderer(LegoClient.RENDER_LEGENDARY_BULLET);
|
||||
g12_equestrian_tkr.setRenderer(LegoClient.RENDER_LEGENDARY_BULLET);
|
||||
|
||||
g26_flare.setRenderer(LegoClient.RENDER_FLARE);
|
||||
g26_flare_supply.setRenderer(LegoClient.RENDER_FLARE_SUPPLY);
|
||||
@ -185,6 +188,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_flaregun) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_heavy_revolver) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_heavy_revolver_lilmac) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_heavy_revolver_protege) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_carbine) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_am180) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_liberator) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
@ -272,7 +272,7 @@ public class Lego {
|
||||
|
||||
public static void standardExplode(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, float range) { standardExplode(bullet, mop, range, 1F); }
|
||||
public static void standardExplode(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, float range, float damageMod) {
|
||||
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, range);
|
||||
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, range, bullet.getThrower());
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, bullet.damage * damageMod).setupPiercing(bullet.config.armorThresholdNegation, bullet.config.armorPiercingPercent));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.setSFX(new ExplosionEffectWeapon(10, 2.5F, 1F));
|
||||
|
||||
@ -874,6 +874,12 @@ public class Orchestras {
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 0 && ctx.config.getReceivers(stack)[0].getMagazine(stack).getType(stack, null) == XFactory12ga.g12_equestrian_bj) {
|
||||
ItemGunBaseNT.setTimer(stack, 0, 20);
|
||||
}
|
||||
}
|
||||
|
||||
if(type == AnimType.CYCLE_DRY) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 1F);
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBulletBaseMK4;
|
||||
import com.hbm.entity.projectile.EntityDuchessGambit;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
@ -44,26 +45,38 @@ public class XFactory12ga {
|
||||
public static BulletConfig g12_explosive;
|
||||
public static BulletConfig g12_phosphorus;
|
||||
public static BulletConfig g12_anthrax;
|
||||
public static BulletConfig g12_equestrian;
|
||||
public static BulletConfig g12_equestrian_bj;
|
||||
public static BulletConfig g12_equestrian_tkr;
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
|
||||
Lego.standardExplode(bullet, mop, 2F); bullet.setDead();
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_BOAT = (bullet, mop) -> {
|
||||
EntityDuchessGambit pippo = new EntityDuchessGambit(bullet.worldObj);
|
||||
pippo.posX = mop.hitVec.xCoord;
|
||||
pippo.posY = mop.hitVec.yCoord + 50;
|
||||
pippo.posZ = mop.hitVec.zCoord;;
|
||||
bullet.worldObj.spawnEntityInWorld(pippo);
|
||||
bullet.worldObj.playSoundEffect(pippo.posX, pippo.posY + 50, pippo.posZ, "hbm:weapon.boat", 100F, 1F);
|
||||
bullet.setDead();
|
||||
};
|
||||
|
||||
public static void init() {
|
||||
|
||||
g12_bp = new BulletConfig().setItem(EnumAmmo.G12_BP).setBlackPowder(true).setProjectiles(8).setDamage(0.5F/8F).setSpread(0.05F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP"));
|
||||
g12_bp_magnum = new BulletConfig().setItem(EnumAmmo.G12_BP_MAGNUM).setBlackPowder(true).setProjectiles(4).setDamage(0.5F/4F).setSpread(0.05F).setRicochetAngle(25).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP_MAGNUM"));
|
||||
g12_bp_slug = new BulletConfig().setItem(EnumAmmo.G12_BP_SLUG).setBlackPowder(true).setDamage(0.5F).setSpread(0.01F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP_SLUG"));
|
||||
g12 = new BulletConfig().setItem(EnumAmmo.G12).setProjectiles(8).setDamage(1F/8F).setSpread(0.05F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xB52B2B, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA"));
|
||||
g12_slug = new BulletConfig().setItem(EnumAmmo.G12_SLUG).setSpread(0.0F).setRicochetAngle(25).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x393939, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_SLUG"));
|
||||
g12_flechette = new BulletConfig().setItem(EnumAmmo.G12_FLECHETTE).setProjectiles(8).setDamage(1F/8F).setThresholdNegation(5F).setArmorPiercing(0.2F).setSpread(0.025F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x3C80F0, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_FLECHETTE"));
|
||||
g12_magnum = new BulletConfig().setItem(EnumAmmo.G12_MAGNUM).setProjectiles(4).setDamage(2F/4F).setSpread(0.015F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x278400, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_MAGNUM"));
|
||||
g12 = new BulletConfig().setItem(EnumAmmo.G12).setProjectiles(8).setDamage(1F/8F).setSpread(0.05F).setRicochetAngle(15).setThresholdNegation(2F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xB52B2B, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA"));
|
||||
g12_slug = new BulletConfig().setItem(EnumAmmo.G12_SLUG).setSpread(0.0F).setRicochetAngle(25).setThresholdNegation(4F).setArmorPiercing(0.15F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x393939, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_SLUG"));
|
||||
g12_flechette = new BulletConfig().setItem(EnumAmmo.G12_FLECHETTE).setProjectiles(8).setDamage(1F/8F).setThresholdNegation(5F).setThresholdNegation(3F).setArmorPiercing(0.2F).setSpread(0.025F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x3C80F0, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_FLECHETTE"));
|
||||
g12_magnum = new BulletConfig().setItem(EnumAmmo.G12_MAGNUM).setProjectiles(4).setDamage(2F/4F).setSpread(0.015F).setRicochetAngle(15).setThresholdNegation(4F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x278400, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_MAGNUM"));
|
||||
g12_explosive = new BulletConfig().setItem(EnumAmmo.G12_EXPLOSIVE).setDamage(2.5F).setOnImpact(LAMBDA_STANDARD_EXPLODE).setSpread(0F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xDA4127, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_EXPLOSIVE"));
|
||||
g12_phosphorus = new BulletConfig().setItem(EnumAmmo.G12_PHOSPHORUS).setProjectiles(8).setDamage(1F/8F).setSpread(0.015F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x910001, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_PHOSPHORUS"))
|
||||
.setOnImpact((bullet, mop) -> { if(mop.entityHit != null && mop.entityHit instanceof EntityLivingBase) { HbmLivingProps data = HbmLivingProps.getData((EntityLivingBase) mop.entityHit); if(data.phosphorus < 300) data.phosphorus = 300; } });
|
||||
//g12_anthrax = new BulletConfig().setItem(EnumAmmo.G12_ANTHRAX).setProjectiles(8).setDamage(1F/8F).setSpread(0.015F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x749300, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_ANTHRAX"));
|
||||
g12_equestrian = new BulletConfig().setItem(EnumAmmoSecret.G12_EQUESTRIAN).setDamage(0F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_EQUESTRIAN, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12gaEquestrian"));
|
||||
g12_equestrian_bj = new BulletConfig().setItem(EnumAmmoSecret.G12_EQUESTRIAN).setDamage(0F).setOnImpact(LAMBDA_BOAT).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_EQUESTRIAN, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12gaEquestrianBJ"));
|
||||
g12_equestrian_tkr = new BulletConfig().setItem(EnumAmmoSecret.G12_EQUESTRIAN).setDamage(0F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_EQUESTRIAN, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12gaEquestrianTKR"));
|
||||
|
||||
BulletConfig[] all = new BulletConfig[] {g12_bp, g12_bp_magnum, g12_bp_slug, g12, g12_slug, g12_flechette, g12_magnum, g12_explosive, g12_phosphorus};
|
||||
|
||||
@ -89,7 +102,7 @@ public class XFactory12ga {
|
||||
.anim(LAMBDA_MARESLEG_SHORT_ANIMS).orchestra(Orchestras.ORCHESTRA_MARESLEG_AKIMBO),
|
||||
new GunConfig().dura(600).draw(5).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12F).delay(20).reload(22, 10, 13, 0).jam(24).sound("hbm:weapon.fire.shotgun", 1.0F, 1.0F)
|
||||
.dmg(16F).delay(20).reload(22, 10, 13, 0).jam(24).sound("hbm:weapon.fire.shotgun", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(1, 6).addConfigs(all))
|
||||
.offset(0.75, -0.0625, -0.1875)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_MARESLEG))
|
||||
@ -101,7 +114,7 @@ public class XFactory12ga {
|
||||
.dura(0).draw(5).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(32F).delay(20).reload(22, 10, 13, 0).jam(24).sound("hbm:weapon.fire.shotgun", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 6).addConfigs(all))
|
||||
.mag(new MagazineSingleReload(0, 6).addConfigs(g12_equestrian_tkr, g12_bp, g12_bp_magnum, g12_bp_slug, g12, g12_slug, g12_flechette, g12_magnum, g12_explosive, g12_phosphorus))
|
||||
.offset(0.75, -0.0625, -0.1875)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_NOWEAR_FIRE).recoil(LAMBDA_RECOIL_MARESLEG))
|
||||
.setupStandardConfiguration()
|
||||
@ -111,7 +124,7 @@ public class XFactory12ga {
|
||||
ModItems.gun_liberator = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(200).draw(20).inspect(21).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(8F).delay(20).rounds(4).reload(25, 15, 7, 0).jam(45).sound("hbm:weapon.fire.shotgunAlt", 1.0F, 1.0F)
|
||||
.dmg(16F).delay(20).rounds(4).reload(25, 15, 7, 0).jam(45).sound("hbm:weapon.fire.shotgunAlt", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 4).addConfigs(all))
|
||||
.offset(0.75, -0.0625, -0.1875)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_LIBERATOR))
|
||||
@ -144,7 +157,7 @@ public class XFactory12ga {
|
||||
.dura(5_000).draw(10).inspect(33).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(64F).delay(1).auto(true).dryfireAfterAuto(true).reload(44).jam(19).sound("hbm:weapon.fire.shotgunAuto", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 100).addConfigs(g12_equestrian, g12_bp, g12_bp_magnum, g12_bp_slug, g12, g12_slug, g12_flechette, g12_magnum, g12_explosive, g12_phosphorus))
|
||||
.mag(new MagazineFullReload(0, 100).addConfigs(g12_equestrian_bj, g12_bp, g12_bp_magnum, g12_bp_slug, g12, g12_slug, g12_flechette, g12_magnum, g12_explosive, g12_phosphorus))
|
||||
.offset(0.75, -0.125, -0.25)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_SEXY))
|
||||
.setupStandardConfiguration()
|
||||
@ -253,11 +266,13 @@ public class XFactory12ga {
|
||||
.addBus("SIGHT", new BusAnimationSequence().addPos(35, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL))
|
||||
.addBus("LEVER", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(-85, 0, 0, 200).addPos(0, 0, 0, 200))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(30, 0, 0, 50).addPos(30, 0, 0, 550).addPos(0, 0, 0, 200))
|
||||
.addBus("FLIP", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(360, 0, 0, 400));
|
||||
.addBus("FLIP", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(360, 0, 0, 400))
|
||||
.addBus("SHELL", new BusAnimationSequence().addPos(-20, 0, 0, 0)); //gets rid of the shell in the barrel during cycling
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("LEVER", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(-90, 0, 0, 200).addPos(0, 0, 0, 200))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(30, 0, 0, 50).addPos(30, 0, 0, 550).addPos(0, 0, 0, 200))
|
||||
.addBus("FLIP", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(360, 0, 0, 400));
|
||||
.addBus("FLIP", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(360, 0, 0, 400))
|
||||
.addBus("SHELL", new BusAnimationSequence().addPos(-20, 0, 0, 0));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(30, 0, 0, 0).addPos(30, 0, 0, 250).addPos(0, 0, 0, 400, IType.SIN_FULL))
|
||||
.addBus("LEVER", new BusAnimationSequence().addPos(-85, 0, 0, 0).addPos(-15, 0, 0, 200).addPos(-15, 0, 0, 650).addPos(-85, 0, 0, 200).addPos(-15, 0, 0, 200).addPos(-15, 0, 0, 200).addPos(-85, 0, 0, 200).addPos(0, 0, 0, 200))
|
||||
|
||||
@ -35,11 +35,11 @@ public class XFactory22lr {
|
||||
SpentCasing casing22 = new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(0.5F);
|
||||
p22_sp = new BulletConfig().setItem(EnumAmmo.P22_SP).setKnockback(0F)
|
||||
.setCasing(casing22.clone().register("p22"));
|
||||
p22_fmj = new BulletConfig().setItem(EnumAmmo.P22_FMJ).setKnockback(0F).setDamage(0.8F).setArmorPiercing(0.1F)
|
||||
p22_fmj = new BulletConfig().setItem(EnumAmmo.P22_FMJ).setKnockback(0F).setDamage(0.8F).setThresholdNegation(1F).setArmorPiercing(0.1F)
|
||||
.setCasing(casing22.clone().register("p22fmj"));
|
||||
p22_jhp = new BulletConfig().setItem(EnumAmmo.P22_JHP).setKnockback(0F).setDamage(1.5F).setArmorPiercing(-0.25F)
|
||||
.setCasing(casing22.clone().register("p22jhp"));
|
||||
p22_ap = new BulletConfig().setItem(EnumAmmo.P22_AP).setKnockback(0F).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
p22_ap = new BulletConfig().setItem(EnumAmmo.P22_AP).setKnockback(0F).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(2.5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing22.clone().setColor(SpentCasing.COLOR_CASE_44).register("p22ap"));
|
||||
|
||||
ModItems.gun_am180 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
|
||||
@ -32,10 +32,10 @@ public class XFactory357 {
|
||||
public static void init() {
|
||||
m357_bp = new BulletConfig().setItem(EnumAmmo.M357_BP).setDamage(0.5F).setBlackPowder(true);
|
||||
m357_sp = new BulletConfig().setItem(EnumAmmo.M357_SP);
|
||||
m357_fmj = new BulletConfig().setItem(EnumAmmo.M357_FMJ).setDamage(0.8F).setArmorPiercing(0.1F);
|
||||
m357_fmj = new BulletConfig().setItem(EnumAmmo.M357_FMJ).setDamage(0.8F).setThresholdNegation(2F).setArmorPiercing(0.1F);
|
||||
m357_jhp = new BulletConfig().setItem(EnumAmmo.M357_JHP).setDamage(1.5F).setArmorPiercing(-0.25F);
|
||||
m357_ap = new BulletConfig().setItem(EnumAmmo.M357_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F);
|
||||
m357_express = new BulletConfig().setItem(EnumAmmo.M357_EXPRESS).setDoesPenetrate(true).setDamage(1.5F).setArmorPiercing(0.1F).setWear(1.5F);
|
||||
m357_ap = new BulletConfig().setItem(EnumAmmo.M357_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(5F).setArmorPiercing(0.15F);
|
||||
m357_express = new BulletConfig().setItem(EnumAmmo.M357_EXPRESS).setDoesPenetrate(true).setDamage(1.5F).setThresholdNegation(2F).setArmorPiercing(0.1F).setWear(1.5F);
|
||||
|
||||
ModItems.gun_light_revolver = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(300).draw(4).inspect(23).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
|
||||
@ -80,7 +80,7 @@ public class XFactory40mm {
|
||||
};
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE_DEMO = (bullet, mop) -> {
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3) return;
|
||||
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 5F);
|
||||
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 5F, bullet.getThrower());
|
||||
vnt.setBlockAllocator(new BlockAllocatorStandard());
|
||||
vnt.setBlockProcessor(new BlockProcessorStandard());
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, bullet.damage));
|
||||
|
||||
@ -3,6 +3,9 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBoxcar;
|
||||
import com.hbm.entity.projectile.EntityBulletBaseMK4;
|
||||
import com.hbm.entity.projectile.EntityTorpedo;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
@ -25,6 +28,7 @@ import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class XFactory44 {
|
||||
@ -37,7 +41,28 @@ public class XFactory44 {
|
||||
public static BulletConfig m44_jhp;
|
||||
public static BulletConfig m44_ap;
|
||||
public static BulletConfig m44_express;
|
||||
public static BulletConfig m44_equestrian;
|
||||
public static BulletConfig m44_equestrian_pip;
|
||||
public static BulletConfig m44_equestrian_mn7;
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_BOXCAR = (bullet, mop) -> {
|
||||
EntityBoxcar pippo = new EntityBoxcar(bullet.worldObj);
|
||||
pippo.posX = mop.hitVec.xCoord;
|
||||
pippo.posY = mop.hitVec.yCoord + 50;
|
||||
pippo.posZ = mop.hitVec.zCoord;;
|
||||
bullet.worldObj.spawnEntityInWorld(pippo);
|
||||
bullet.worldObj.playSoundEffect(pippo.posX, pippo.posY + 50, pippo.posZ, "hbm:alarm.trainHorn", 100F, 1F);
|
||||
bullet.setDead();
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_TORPEDO = (bullet, mop) -> {
|
||||
EntityTorpedo pippo = new EntityTorpedo(bullet.worldObj);
|
||||
pippo.posX = mop.hitVec.xCoord;
|
||||
pippo.posY = mop.hitVec.yCoord + 50;
|
||||
pippo.posZ = mop.hitVec.zCoord;;
|
||||
bullet.worldObj.spawnEntityInWorld(pippo);
|
||||
//bullet.worldObj.playSoundEffect(pippo.posX, pippo.posY + 50, pippo.posZ, "hbm:alarm.trainHorn", 100F, 1F);
|
||||
bullet.setDead();
|
||||
};
|
||||
|
||||
public static void init() {
|
||||
SpentCasing casing44 = new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_BRASS).setupSmoke(1F, 0.5D, 60, 20);
|
||||
@ -45,16 +70,18 @@ public class XFactory44 {
|
||||
.setCasing(casing44.clone().register("m44bp"));
|
||||
m44_sp = new BulletConfig().setItem(EnumAmmo.M44_SP)
|
||||
.setCasing(casing44.clone().register("m44"));
|
||||
m44_fmj = new BulletConfig().setItem(EnumAmmo.M44_FMJ).setDamage(0.8F).setArmorPiercing(0.1F)
|
||||
m44_fmj = new BulletConfig().setItem(EnumAmmo.M44_FMJ).setDamage(0.8F).setThresholdNegation(3F).setArmorPiercing(0.1F)
|
||||
.setCasing(casing44.clone().register("m44fmj"));
|
||||
m44_jhp = new BulletConfig().setItem(EnumAmmo.M44_JHP).setDamage(1.5F).setArmorPiercing(-0.25F)
|
||||
.setCasing(casing44.clone().register("m44jhp"));
|
||||
m44_ap = new BulletConfig().setItem(EnumAmmo.M44_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
m44_ap = new BulletConfig().setItem(EnumAmmo.M44_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(7.5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing44.clone().setColor(SpentCasing.COLOR_CASE_44).register("m44ap"));
|
||||
m44_express = new BulletConfig().setItem(EnumAmmo.M44_EXPRESS).setDoesPenetrate(true).setDamage(1.5F).setArmorPiercing(0.1F).setWear(1.5F)
|
||||
m44_express = new BulletConfig().setItem(EnumAmmo.M44_EXPRESS).setDoesPenetrate(true).setDamage(1.5F).setThresholdNegation(3F).setArmorPiercing(0.1F).setWear(1.5F)
|
||||
.setCasing(casing44.clone().register("m44express"));
|
||||
m44_equestrian = new BulletConfig().setItem(EnumAmmoSecret.M44_EQUESTRIAN).setDamage(0F)
|
||||
.setCasing(casing44.clone().setColor(SpentCasing.COLOR_CASE_EQUESTRIAN).register("m44equestrian"));
|
||||
m44_equestrian_pip = new BulletConfig().setItem(EnumAmmoSecret.M44_EQUESTRIAN).setDamage(0F).setOnImpact(LAMBDA_BOXCAR)
|
||||
.setCasing(casing44.clone().setColor(SpentCasing.COLOR_CASE_EQUESTRIAN).register("m44equestrianPip"));
|
||||
m44_equestrian_mn7 = new BulletConfig().setItem(EnumAmmoSecret.M44_EQUESTRIAN).setDamage(0F).setOnImpact(LAMBDA_TORPEDO)
|
||||
.setCasing(casing44.clone().setColor(SpentCasing.COLOR_CASE_EQUESTRIAN).register("m44equestrianMn7"));
|
||||
|
||||
ModItems.gun_henry = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(300).draw(15).inspect(23).reloadSequential(true).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
@ -81,12 +108,22 @@ public class XFactory44 {
|
||||
.dura(31_000).draw(10).inspect(23).crosshair(Crosshair.L_CLASSIC).scopeTexture(scope_lilmac).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(30F).delay(14).reload(46).jam(23).sound("hbm:weapon.44Shoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(m44_equestrian, m44_bp, m44_sp, m44_fmj, m44_jhp, m44_ap, m44_express))
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(m44_equestrian_pip, m44_bp, m44_sp, m44_fmj, m44_jhp, m44_ap, m44_express))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_NOPIP))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_LILMAC_ANIMS).orchestra(Orchestras.ORCHESTRA_NOPIP)
|
||||
).setUnlocalizedName("gun_heavy_revolver_lilmac");
|
||||
ModItems.gun_heavy_revolver_protege = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
|
||||
.dura(31_000).draw(10).inspect(23).crosshair(Crosshair.L_CLASSIC).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(30F).delay(14).reload(46).jam(23).sound("hbm:weapon.44Shoot", 1.0F, 0.8F)
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(m44_equestrian_mn7, m44_bp, m44_sp, m44_fmj, m44_jhp, m44_ap, m44_express))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_NOPIP))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_LILMAC_ANIMS).orchestra(Orchestras.ORCHESTRA_NOPIP)
|
||||
).setUnlocalizedName("gun_heavy_revolver_protege");
|
||||
|
||||
ModItems.gun_hangman = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
|
||||
.dura(600).draw(10).inspect(31).inspectCancel(false).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
|
||||
@ -34,13 +34,13 @@ public class XFactory50 {
|
||||
SpentCasing casing762 = new SpentCasing(CasingType.BOTTLENECK).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(1.5F);
|
||||
bmg50_sp = new BulletConfig().setItem(EnumAmmo.BMG50_SP)
|
||||
.setCasing(casing762.clone().register("bmg50"));
|
||||
bmg50_fmj = new BulletConfig().setItem(EnumAmmo.BMG50_FMJ).setDamage(0.8F).setArmorPiercing(0.1F)
|
||||
bmg50_fmj = new BulletConfig().setItem(EnumAmmo.BMG50_FMJ).setDamage(0.8F).setThresholdNegation(7F).setArmorPiercing(0.1F)
|
||||
.setCasing(casing762.clone().register("bmg50fmj"));
|
||||
bmg50_jhp = new BulletConfig().setItem(EnumAmmo.BMG50_JHP).setDamage(1.5F).setArmorPiercing(-0.25F)
|
||||
.setCasing(casing762.clone().register("bmg50jhp"));
|
||||
bmg50_ap = new BulletConfig().setItem(EnumAmmo.BMG50_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
bmg50_ap = new BulletConfig().setItem(EnumAmmo.BMG50_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(17.5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50ap"));
|
||||
bmg50_du = new BulletConfig().setItem(EnumAmmo.BMG50_DU).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(2.5F).setArmorPiercing(0.25F)
|
||||
bmg50_du = new BulletConfig().setItem(EnumAmmo.BMG50_DU).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(2.5F).setThresholdNegation(21F).setArmorPiercing(0.25F)
|
||||
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50du"));
|
||||
|
||||
ModItems.gun_m2 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
|
||||
@ -41,11 +41,11 @@ public class XFactory556mm {
|
||||
SpentCasing casing556 = new SpentCasing(CasingType.BOTTLENECK).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(0.8F);
|
||||
r556_sp = new BulletConfig().setItem(EnumAmmo.R556_SP)
|
||||
.setCasing(casing556.clone().register("r556"));
|
||||
r556_fmj = new BulletConfig().setItem(EnumAmmo.R556_FMJ).setDamage(0.8F).setArmorPiercing(0.1F)
|
||||
r556_fmj = new BulletConfig().setItem(EnumAmmo.R556_FMJ).setDamage(0.8F).setThresholdNegation(4F).setArmorPiercing(0.1F)
|
||||
.setCasing(casing556.clone().register("r556fmj"));
|
||||
r556_jhp = new BulletConfig().setItem(EnumAmmo.R556_JHP).setDamage(1.5F).setArmorPiercing(-0.25F)
|
||||
.setCasing(casing556.clone().register("r556jhp"));
|
||||
r556_ap = new BulletConfig().setItem(EnumAmmo.R556_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
r556_ap = new BulletConfig().setItem(EnumAmmo.R556_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(10F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing556.clone().setColor(SpentCasing.COLOR_CASE_44).register("r556ap"));
|
||||
|
||||
ModItems.gun_g3 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
|
||||
@ -41,13 +41,13 @@ public class XFactory762mm {
|
||||
SpentCasing casing762 = new SpentCasing(CasingType.BOTTLENECK).setColor(SpentCasing.COLOR_CASE_BRASS);
|
||||
r762_sp = new BulletConfig().setItem(EnumAmmo.R762_SP)
|
||||
.setCasing(casing762.clone().register("r762"));
|
||||
r762_fmj = new BulletConfig().setItem(EnumAmmo.R762_FMJ).setDamage(0.8F).setArmorPiercing(0.1F)
|
||||
r762_fmj = new BulletConfig().setItem(EnumAmmo.R762_FMJ).setDamage(0.8F).setThresholdNegation(5F).setArmorPiercing(0.1F)
|
||||
.setCasing(casing762.clone().register("r762fmj"));
|
||||
r762_jhp = new BulletConfig().setItem(EnumAmmo.R762_JHP).setDamage(1.5F).setArmorPiercing(-0.25F)
|
||||
.setCasing(casing762.clone().register("r762jhp"));
|
||||
r762_ap = new BulletConfig().setItem(EnumAmmo.R762_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
r762_ap = new BulletConfig().setItem(EnumAmmo.R762_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(12.5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("r762ap"));
|
||||
r762_du = new BulletConfig().setItem(EnumAmmo.R762_DU).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(2.5F).setArmorPiercing(0.25F)
|
||||
r762_du = new BulletConfig().setItem(EnumAmmo.R762_DU).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(2.5F).setThresholdNegation(15F).setArmorPiercing(0.25F)
|
||||
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("r762du"));
|
||||
|
||||
energy_lacunae = new BulletConfig().setItem(EnumAmmo.CAPACITOR).setupDamageClass(DamageClass.LASER).setBeam().setReloadCount(40).setSpread(0.0F).setLife(5).setRenderRotations(false).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
|
||||
|
||||
@ -36,11 +36,11 @@ public class XFactory9mm {
|
||||
SpentCasing casing9 = new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(1F, 1F, 0.75F);
|
||||
p9_sp = new BulletConfig().setItem(EnumAmmo.P9_SP)
|
||||
.setCasing(casing9.clone().register("p9"));
|
||||
p9_fmj = new BulletConfig().setItem(EnumAmmo.P9_FMJ).setDamage(0.8F).setArmorPiercing(0.1F)
|
||||
p9_fmj = new BulletConfig().setItem(EnumAmmo.P9_FMJ).setDamage(0.8F).setThresholdNegation(2F).setArmorPiercing(0.1F)
|
||||
.setCasing(casing9.clone().register("p9fmj"));
|
||||
p9_jhp = new BulletConfig().setItem(EnumAmmo.P9_JHP).setDamage(1.5F).setArmorPiercing(-0.25F)
|
||||
.setCasing(casing9.clone().register("p9jhp"));
|
||||
p9_ap = new BulletConfig().setItem(EnumAmmo.P9_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
p9_ap = new BulletConfig().setItem(EnumAmmo.P9_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing9.clone().setColor(SpentCasing.COLOR_CASE_44).register("p9ap"));
|
||||
|
||||
ModItems.gun_greasegun = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
@ -87,7 +87,7 @@ public class XFactory9mm {
|
||||
.anim(LAMBDA_UZI_ANIMS).orchestra(Orchestras.ORCHESTRA_UZI_AKIMBO),
|
||||
new GunConfig().dura(3_000).draw(15).inspect(31).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(7.5F).delay(2).dry(25).auto(true).spread(0.005F).reload(55).jam(50).sound("hbm:weapon.fire.uzi", 1.0F, 1.0F)
|
||||
.dmg(3F).delay(2).dry(25).auto(true).spread(0.005F).reload(55).jam(50).sound("hbm:weapon.fire.uzi", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(1, 30).addConfigs(p9_sp, p9_fmj, p9_jhp, p9_ap))
|
||||
.offset(1, -0.0625 * 2.5, -0.375D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_UZI))
|
||||
|
||||
@ -63,7 +63,7 @@ public class XFactoryEnergy {
|
||||
mop.hitVec.zCoord += dir.offsetZ * 0.5;
|
||||
}
|
||||
|
||||
ExplosionVNT vnt = new ExplosionVNT(beam.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 2F);
|
||||
ExplosionVNT vnt = new ExplosionVNT(beam.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 2F, beam.getThrower());
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, beam.damage).setDamageClass(beam.config.dmgClass));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.explode();
|
||||
|
||||
@ -35,6 +35,7 @@ import com.hbm.util.DamageResistanceHandler.DamageClass;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@ -79,7 +80,10 @@ public class XFactoryFolly {
|
||||
for(int ix = x - 1; ix <= x + 1; ix++) for(int iy = y - 1; iy <= y + 1; iy++) for(int iz = z - 1; iz <= z + 1; iz++) {
|
||||
if(iy > 0 && iy < 256) beam.worldObj.setBlock(ix, iy, iz, Blocks.air);
|
||||
AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(ix - 1, iy - 1, iz - 1, ix + 2, iy + 2, iz + 2);
|
||||
for(Entity e : entities) if(e != beam.thrower && e.boundingBox.intersectsWith(aabb)) EntityDamageUtil.attackEntityFromIgnoreIFrame(e, beam.config.getDamage(beam, beam.thrower, beam.config.dmgClass), beam.damage);
|
||||
for(Entity e : entities) if(e != beam.thrower && e.boundingBox.intersectsWith(aabb)) {
|
||||
if(e instanceof EntityLivingBase) EntityDamageUtil.attackEntityFromNT((EntityLivingBase) e, beam.config.getDamage(beam, beam.thrower, beam.config.dmgClass), beam.damage, true, false, 0D, 100F, 0.99F);
|
||||
else EntityDamageUtil.attackEntityFromIgnoreIFrame(e, beam.config.getDamage(beam, beam.thrower, beam.config.dmgClass), beam.damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -95,7 +95,7 @@ public class XFactoryRocket {
|
||||
};
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE_DEMO = (bullet, mop) -> {
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3) return;
|
||||
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 5F);
|
||||
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 5F, bullet.getThrower());
|
||||
vnt.setBlockAllocator(new BlockAllocatorStandard());
|
||||
vnt.setBlockProcessor(new BlockProcessorStandard());
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, bullet.damage));
|
||||
|
||||
@ -575,6 +575,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBoxcar.class, new RenderBoxcar());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDuchessGambit.class, new RenderBoxcar());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBuilding.class, new RenderBoxcar());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTorpedo.class, new RenderBoxcar());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBomber.class, new RenderBomber());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityC130.class, new RenderC130());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBurningFOEQ.class, new RenderFOEQ());
|
||||
@ -583,7 +584,6 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBobmazon.class, new RenderMinerRocket());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTom.class, new RenderTom());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityAAShell.class, new RenderMirv());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRocketHoming.class, new RenderSRocket());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChopperMine.class, new RenderChopperMine());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRubble.class, new RenderRubble());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityShrapnel.class, new RenderShrapnel());
|
||||
@ -1568,6 +1568,11 @@ public class ClientProxy extends ServerProxy {
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
||||
}
|
||||
|
||||
if("bf".equals(type)) {
|
||||
ParticleMukeCloud cloud = new ParticleMukeCloudBF(man, world, x, y, z, 0, 0, 0);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
||||
}
|
||||
|
||||
if("haze".equals(type)) {
|
||||
|
||||
ParticleHaze fog = new ParticleHaze(man, world, x, y, z);
|
||||
|
||||
@ -168,9 +168,7 @@ public class MainRegistry {
|
||||
public static Achievement achSacrifice;
|
||||
public static Achievement achImpossible;
|
||||
public static Achievement achTOB;
|
||||
public static Achievement achFreytag;
|
||||
public static Achievement achPotato;
|
||||
public static Achievement achC44;
|
||||
public static Achievement achC20_5;
|
||||
public static Achievement achFiend;
|
||||
public static Achievement achFiend2;
|
||||
@ -662,9 +660,7 @@ public class MainRegistry {
|
||||
achImpossible = new Achievement("achievement.impossible", "impossible", 18, 10, ModItems.nothing, null).initIndependentStat().setSpecial().registerStat();
|
||||
achTOB = new Achievement("achievement.tasteofblood", "tasteofblood", 3, 10, new ItemStack(ModItems.fluid_icon, 1, Fluids.ASCHRAB.getID()), null).initIndependentStat().setSpecial().registerStat();
|
||||
achGoFish = new Achievement("achievement.goFish", "goFish", 5, 10, DictFrame.fromOne(ModItems.achievement_icon, EnumAchievementType.GOFISH), null).initIndependentStat().setSpecial().registerStat();
|
||||
achFreytag = new Achievement("achievement.freytag", "freytag", 0, -4, ModItems.gun_mp40, null).initIndependentStat().setSpecial().registerStat();
|
||||
achPotato = new Achievement("achievement.potato", "potato", -2, -2, ModItems.battery_potatos, null).initIndependentStat().setSpecial().registerStat();
|
||||
achC44 = new Achievement("achievement.c44", "c44", 2, -4, ModItems.gun_revolver_pip, null).initIndependentStat().setSpecial().registerStat();
|
||||
achC20_5 = new Achievement("achievement.c20_5", "c20_5", 3, 6, DictFrame.fromOne(ModItems.achievement_icon, EnumAchievementType.QUESTIONMARK), null).initIndependentStat().setSpecial().registerStat();
|
||||
achFiend = new Achievement("achievement.fiend", "fiend", -6, 8, ModItems.shimmer_sledge, null).initIndependentStat().setSpecial().registerStat();
|
||||
achFiend2 = new Achievement("achievement.fiend2", "fiend2", -4, 9, ModItems.shimmer_axe, null).initIndependentStat().setSpecial().registerStat();
|
||||
@ -738,9 +734,7 @@ public class MainRegistry {
|
||||
achImpossible,
|
||||
achTOB,
|
||||
achGoFish,
|
||||
achFreytag,
|
||||
achPotato,
|
||||
achC44,
|
||||
achC20_5,
|
||||
achFiend,
|
||||
achFiend2,
|
||||
@ -1495,6 +1489,9 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:item.clip_euthanasia");
|
||||
ignoreMappings.add("hbm:item.clip_defabricator");
|
||||
ignoreMappings.add("hbm:item.ammo_folly_du");
|
||||
ignoreMappings.add("hbm:tile.#null");
|
||||
ignoreMappings.add("hbm:tile.#void");
|
||||
ignoreMappings.add("hbm:tile.#ngtv");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -852,7 +852,8 @@ public class ModEventHandler {
|
||||
|
||||
if(servo != null && servo.getItem() == ModItems.ballistic_gauntlet) {
|
||||
|
||||
BulletConfiguration firedConfig = null;
|
||||
//TODO: fix this shit
|
||||
/*BulletConfig firedConfig = null;
|
||||
|
||||
for(Integer config : HbmCollection.g12) {
|
||||
BulletConfiguration cfg = BulletConfigSyncingUtil.pullConfig(config);
|
||||
@ -876,7 +877,7 @@ public class ModEventHandler {
|
||||
}
|
||||
|
||||
player.worldObj.playSoundAtEntity(player, "hbm:weapon.shotgunShoot", 1.0F, 1.0F);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,9 +50,6 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.hideItem(new ItemStack(ModBlocks.machine_nuke_furnace_on));
|
||||
API.hideItem(new ItemStack(ModBlocks.machine_rtg_furnace_on));
|
||||
API.hideItem(new ItemStack(ModBlocks.reinforced_lamp_on));
|
||||
API.hideItem(new ItemStack(ModBlocks.statue_elb));
|
||||
API.hideItem(new ItemStack(ModBlocks.statue_elb_g));
|
||||
API.hideItem(new ItemStack(ModBlocks.statue_elb_w));
|
||||
API.hideItem(new ItemStack(ModBlocks.statue_elb_f));
|
||||
API.hideItem(new ItemStack(ModBlocks.cheater_virus));
|
||||
API.hideItem(new ItemStack(ModBlocks.cheater_virus_seed));
|
||||
|
||||
@ -987,6 +987,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation maresleg_broken_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/maresleg_broken.png");
|
||||
public static final ResourceLocation flaregun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flaregun.png");
|
||||
public static final ResourceLocation heavy_revolver_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/heavy_revolver.png");
|
||||
public static final ResourceLocation heavy_revolver_protege_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/protege.png");
|
||||
public static final ResourceLocation lilmac_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lilmac.png");
|
||||
public static final ResourceLocation lilmac_scope_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lilmac_scope.png");
|
||||
public static final ResourceLocation carbine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/huntsman.png");
|
||||
@ -1117,6 +1118,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom boxcar = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/boxcar.obj"));
|
||||
public static final IModelCustom duchessgambit = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/duchessgambit.obj"));
|
||||
public static final IModelCustom building = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/weapons/building.obj"));
|
||||
public static final IModelCustom torpedo = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/torpedo.obj"));
|
||||
public static final IModelCustom rpc = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/rpc.obj"));
|
||||
public static final IModelCustom tom_main = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/weapons/tom_main.obj"));
|
||||
public static final IModelCustom tom_flame = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/weapons/tom_flame.hmf"));
|
||||
@ -1240,6 +1242,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation boxcar_tex = new ResourceLocation(RefStrings.MODID, "textures/models/boxcar.png");
|
||||
public static final ResourceLocation duchessgambit_tex = new ResourceLocation(RefStrings.MODID, "textures/models/duchessgambit.png");
|
||||
public static final ResourceLocation building_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/building.png");
|
||||
public static final ResourceLocation torpedo_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/torpedo.png");
|
||||
public static final ResourceLocation rpc_tex = new ResourceLocation(RefStrings.MODID, "textures/models/rpc.png");
|
||||
public static final ResourceLocation tom_main_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tom_main.png");
|
||||
public static final ResourceLocation tom_flame_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tom_flame.png");
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
package com.hbm.render.entity.projectile;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelBaleflare;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderBaleflare extends Render {
|
||||
|
||||
private ModelBaleflare miniNuke;
|
||||
|
||||
public RenderBaleflare() {
|
||||
miniNuke = new ModelBaleflare();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_ + 180, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/BaleFlare.png"));
|
||||
miniNuke.renderAll(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return new ResourceLocation(RefStrings.MODID + ":textures/models/BaleFlare.png");
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.entity.projectile.EntityBoxcar;
|
||||
import com.hbm.entity.projectile.EntityBuilding;
|
||||
import com.hbm.entity.projectile.EntityDuchessGambit;
|
||||
import com.hbm.entity.projectile.EntityTorpedo;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
@ -14,43 +15,50 @@ import net.minecraft.util.ResourceLocation;
|
||||
public class RenderBoxcar extends Render {
|
||||
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
|
||||
float p_76986_9_) {
|
||||
public void doRender(Entity entity, double x, double y, double z, float f0, float f1) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
if(p_76986_1_ instanceof EntityBoxcar) {
|
||||
GL11.glTranslatef(0, 0, -1.5F);
|
||||
GL11.glRotated(180, 0, 0, 1);
|
||||
GL11.glRotated(90, 1, 0, 0);
|
||||
|
||||
bindTexture(ResourceManager.boxcar_tex);
|
||||
ResourceManager.boxcar.renderAll();
|
||||
}
|
||||
|
||||
if(p_76986_1_ instanceof EntityDuchessGambit) {
|
||||
GL11.glTranslatef(0, 0, -1.0F);
|
||||
|
||||
bindTexture(ResourceManager.duchessgambit_tex);
|
||||
ResourceManager.duchessgambit.renderAll();
|
||||
}
|
||||
|
||||
if(p_76986_1_ instanceof EntityBuilding) {
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
bindTexture(ResourceManager.building_tex);
|
||||
ResourceManager.building.renderAll();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
}
|
||||
|
||||
GL11.glTranslated(x, y, z);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
if(entity instanceof EntityBoxcar) {
|
||||
GL11.glTranslatef(0, 0, -1.5F);
|
||||
GL11.glRotated(180, 0, 0, 1);
|
||||
GL11.glRotated(90, 1, 0, 0);
|
||||
|
||||
bindTexture(ResourceManager.boxcar_tex);
|
||||
ResourceManager.boxcar.renderAll();
|
||||
}
|
||||
|
||||
if(entity instanceof EntityDuchessGambit) {
|
||||
GL11.glTranslatef(0, 0, -1.0F);
|
||||
|
||||
bindTexture(ResourceManager.duchessgambit_tex);
|
||||
ResourceManager.duchessgambit.renderAll();
|
||||
}
|
||||
|
||||
if(entity instanceof EntityBuilding) {
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
bindTexture(ResourceManager.building_tex);
|
||||
ResourceManager.building.renderAll();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
}
|
||||
|
||||
if(entity instanceof EntityTorpedo) {
|
||||
float f = entity.ticksExisted + f1;
|
||||
GL11.glRotatef(Math.min(85, f * 3), 1, 0, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.torpedo_tex);
|
||||
ResourceManager.torpedo.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
protected ResourceLocation getEntityTexture(Entity entity) {
|
||||
return ResourceManager.boxcar_tex;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.model.ModelBaleflare;
|
||||
import com.hbm.render.model.ModelBullet;
|
||||
import com.hbm.render.util.RenderSparks;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
@ -31,11 +30,9 @@ import net.minecraft.util.Vec3;
|
||||
public class RenderBullet extends Render {
|
||||
|
||||
private ModelBullet bullet;
|
||||
private ModelBaleflare bf;
|
||||
|
||||
public RenderBullet() {
|
||||
bullet = new ModelBullet();
|
||||
bf = new ModelBaleflare();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -65,14 +62,10 @@ public class RenderBullet extends Render {
|
||||
case BulletConfiguration.STYLE_PELLET: renderBuckshot(); break;
|
||||
case BulletConfiguration.STYLE_ROCKET: renderRocket(trail); break;
|
||||
case BulletConfiguration.STYLE_GRENADE: renderGrenade(trail); break;
|
||||
case BulletConfiguration.STYLE_NUKE: renderNuke(0); break;
|
||||
case BulletConfiguration.STYLE_MIRV: renderNuke(1); break;
|
||||
case BulletConfiguration.STYLE_BF: renderNuke(2); break;
|
||||
case BulletConfiguration.STYLE_ORB: renderOrb(trail); break;
|
||||
case BulletConfiguration.STYLE_METEOR: renderMeteor(trail); break;
|
||||
case BulletConfiguration.STYLE_APDS: renderAPDS(); break;
|
||||
case BulletConfiguration.STYLE_BLADE: renderBlade(); break;
|
||||
case BulletConfiguration.STYLE_BARREL: renderNuke(3); break;
|
||||
case BulletConfiguration.STYLE_TAU: renderTau(bullet, trail, f1); break;
|
||||
case BulletConfiguration.STYLE_LEADBURSTER: renderLeadburster(bullet, f1); break;
|
||||
default: renderBullet(trail); break;
|
||||
@ -185,41 +178,6 @@ public class RenderBullet extends Render {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
private void renderNuke(int type) {
|
||||
|
||||
switch(type) {
|
||||
case 0:
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.mini_nuke_tex);
|
||||
ResourceManager.projectiles.renderPart("MiniNuke");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
break;
|
||||
case 1:
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.mini_mirv_tex);
|
||||
ResourceManager.projectiles.renderPart("MiniMIRV");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
break;
|
||||
case 2:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/BaleFlare.png"));
|
||||
bf.renderAll(0.0625F); break;
|
||||
case 3:
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glTranslated(0, -0.5, 0);
|
||||
bindTexture(ResourceManager.waste_drum_tex);
|
||||
ResourceManager.waste_drum.renderAll();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void renderOrb(int type) {
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
package com.hbm.render.entity.projectile;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelMIRV;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderMiniMIRV extends Render {
|
||||
|
||||
private ModelMIRV miniNuke;
|
||||
|
||||
public RenderMiniMIRV() {
|
||||
miniNuke = new ModelMIRV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_ + 180, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/Mirv.png"));
|
||||
miniNuke.renderAll(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return new ResourceLocation(RefStrings.MODID + ":textures/models/Mirv.png");
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
package com.hbm.render.entity.projectile;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelMiniNuke;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderMiniNuke extends Render {
|
||||
|
||||
private ModelMiniNuke miniNuke;
|
||||
|
||||
public RenderMiniNuke() {
|
||||
miniNuke = new ModelMiniNuke();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_ + 180, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/MiniNuke.png"));
|
||||
miniNuke.renderAll(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return new ResourceLocation(RefStrings.MODID + ":textures/models/MiniNuke.png");
|
||||
}
|
||||
}
|
||||
@ -25,17 +25,17 @@ public class RenderMirv extends Render {
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
bindTexture(boyTexture);
|
||||
boyModel.renderAll();
|
||||
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
bindTexture(boyTexture);
|
||||
boyModel.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return new ResourceLocation(RefStrings.MODID +":textures/models/TheGadget3_.png");
|
||||
return new ResourceLocation(RefStrings.MODID + ":textures/models/TheGadget3_.png");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
package com.hbm.render.entity.projectile;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.entity.projectile.EntityRocketHoming;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelSRocket;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderSRocket extends Render {
|
||||
|
||||
private ModelSRocket missile;
|
||||
|
||||
public RenderSRocket() {
|
||||
missile = new ModelSRocket();
|
||||
}
|
||||
|
||||
public void doRender(EntityRocketHoming rocket, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
|
||||
float p_76986_9_) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
|
||||
GL11.glRotatef(rocket.prevRotationYaw + (rocket.rotationYaw - rocket.prevRotationYaw) * p_76986_9_ - 90.0F,
|
||||
0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(rocket.prevRotationPitch + (rocket.rotationPitch - rocket.prevRotationPitch) * p_76986_9_ + 180,
|
||||
0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
|
||||
if(rocket.getIsCritical())
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/ModelSVTRocket.png"));
|
||||
else
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/ModelSRocket.png"));
|
||||
missile.renderAll(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(Entity rocket, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
|
||||
float p_76986_9_) {
|
||||
doRender((EntityRocketHoming)rocket, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return new ResourceLocation(RefStrings.MODID + ":textures/models/ModelSRocket.png");
|
||||
}
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelBFLauncher;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderBFLauncher implements IItemRenderer {
|
||||
|
||||
protected ModelBFLauncher swordModel;
|
||||
|
||||
public ItemRenderBFLauncher() {
|
||||
swordModel = new ModelBFLauncher();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/BFLauncher.png"));
|
||||
GL11.glRotatef(-150.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.8F, -0.1F, -0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/BFLauncher.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelBaleflare;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderBaleflare implements IItemRenderer {
|
||||
|
||||
protected ModelBaleflare swordModel;
|
||||
|
||||
public ItemRenderBaleflare() {
|
||||
swordModel = new ModelBaleflare();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/BaleFlare.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/BaleFlare.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,117 +0,0 @@
|
||||
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 ItemRenderBenelli implements IItemRenderer
|
||||
{
|
||||
public ItemRenderBenelli() {}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch (type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
case INVENTORY:
|
||||
return true;
|
||||
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) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.benelli_tex);
|
||||
final float scale1 = 0.2F;
|
||||
final double scale2 = 0.065D;
|
||||
final double scale3 = 0.52D;
|
||||
|
||||
switch (type) {
|
||||
case EQUIPPED_FIRST_PERSON:// In hand from POV
|
||||
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
if (player.isSneaking()) {
|
||||
GL11.glRotatef(25.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-5F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-1.007F, 0F, -2.5F);
|
||||
}
|
||||
else {
|
||||
GL11.glRotatef(-10F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.5F, -2.5F);
|
||||
}
|
||||
|
||||
GL11.glScalef(scale1, scale1, scale1);
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Body");
|
||||
ResourceManager.benelli.renderPart("Body");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Bolt");
|
||||
ResourceManager.benelli.renderPart("Bolt");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Drum");
|
||||
ResourceManager.benelli.renderPart("Drum");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Shell");
|
||||
ResourceManager.benelli.renderPart("Shell");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
break;
|
||||
case EQUIPPED:// In hand from other's POV
|
||||
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-170, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-15F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.4F, 0.05F, -0.5F);
|
||||
GL11.glScaled(scale2 - scale2 * 2, scale2, scale2);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case ENTITY:// Dropped entity
|
||||
GL11.glScaled(0.0625D, 0.0625D, 0.0625D);
|
||||
break;
|
||||
case INVENTORY:// Inventory icon
|
||||
GL11.glScaled(scale3, scale3, -scale3);
|
||||
GL11.glTranslatef(14.4F, 15.0F, 0.0F);
|
||||
GL11.glRotatef(270.0F, 10.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(52.5F, 0.0F, 10.0F, 0.0F);
|
||||
GL11.glRotatef(270.0F, 0.0F, 0.0F, 10.0F);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON)
|
||||
ResourceManager.benelli.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelCryolator;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderCryolator implements IItemRenderer {
|
||||
|
||||
protected ModelCryolator swordModel;
|
||||
|
||||
public ItemRenderCryolator() {
|
||||
swordModel = new ModelCryolator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelCryolator.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
//GL11.glTranslatef(-0.4F, -0.1F, 0.1F);
|
||||
GL11.glTranslatef(-0.2F, -0.1F, -0.1F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelCryolator.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glTranslatef(-0.8F, 0.0F, 0.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,75 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelEMPRay;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderEMPRay implements IItemRenderer {
|
||||
|
||||
protected ModelEMPRay swordModel;
|
||||
|
||||
public ItemRenderEMPRay() {
|
||||
swordModel = new ModelEMPRay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
float f = 0;
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelEMPRay.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(-0.8F, -0.2F, 0.0F);
|
||||
GL11.glRotatef(-15.0F, 0.0F, 0.0F, 1.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelEMPRay.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(-1.8F, -0.2F, 0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelFatman;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderFatMan implements IItemRenderer {
|
||||
|
||||
protected ModelFatman swordModel;
|
||||
|
||||
public ItemRenderFatMan() {
|
||||
swordModel = new ModelFatman();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/FatmanLauncher.png"));
|
||||
GL11.glRotatef(-150.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.8F, -0.1F, -0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/FatmanLauncher.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6,8 +6,6 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.GunB92;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelB92;
|
||||
import com.hbm.render.model.ModelB93;
|
||||
import com.hbm.render.model.ModelLeverAction;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -16,14 +14,10 @@ import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderGunAnim implements IItemRenderer {
|
||||
|
||||
protected ModelLeverAction flippedGun;
|
||||
protected ModelB92 b92;
|
||||
protected ModelB93 b93;
|
||||
|
||||
public ItemRenderGunAnim() {
|
||||
flippedGun = new ModelLeverAction();
|
||||
b92 = new ModelB92();
|
||||
b93 = new ModelB93();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -51,24 +45,14 @@ public class ItemRenderGunAnim implements IItemRenderer {
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
if(item.getItem() == ModItems.gun_lever_action_sonata)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLeverAction.png"));
|
||||
if(item.getItem() == ModItems.gun_b92)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelB92SM.png"));
|
||||
if(item.getItem() == ModItems.gun_b93)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelB93.png"));
|
||||
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(-0.2F, -0.1F, -0.1F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_lever_action_sonata) {
|
||||
GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(2.3F, 0.2F, 0.8F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_b92 && GunB92.getRotationFromAnim(item) > 0) {
|
||||
float off = GunB92.getRotationFromAnim(item) * 2;
|
||||
@ -76,15 +60,8 @@ public class ItemRenderGunAnim implements IItemRenderer {
|
||||
GL11.glTranslatef(off * -0.5F, off * -0.5F, 0.0F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_b93 && GunB92.getRotationFromAnim(item) > 0) {
|
||||
float off = GunB92.getRotationFromAnim(item) * 2;
|
||||
GL11.glRotatef(GunB92.getRotationFromAnim(item) * -90, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(off * -0.5F, off * -0.5F, 0.0F);
|
||||
}
|
||||
if(item.getItem() == ModItems.gun_b92)
|
||||
b92.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunB92.getTransFromAnim(item));
|
||||
if(item.getItem() == ModItems.gun_b93)
|
||||
b93.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunB92.getTransFromAnim(item));
|
||||
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
@ -92,20 +69,8 @@ public class ItemRenderGunAnim implements IItemRenderer {
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
if(item.getItem() == ModItems.gun_lever_action || item.getItem() == ModItems.gun_lever_action_sonata)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLeverAction.png"));
|
||||
if(item.getItem() == ModItems.gun_bolt_action)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelBoltActionDark.png"));
|
||||
if(item.getItem() == ModItems.gun_lever_action_dark)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLeverActionDark.png"));
|
||||
if(item.getItem() == ModItems.gun_bolt_action_green)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelBoltActionGreen.png"));
|
||||
if(item.getItem() == ModItems.gun_bolt_action_saturnite)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelBoltActionSaturnite.png"));
|
||||
if(item.getItem() == ModItems.gun_b92)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelB92SM.png"));
|
||||
if(item.getItem() == ModItems.gun_b93)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelB93.png"));
|
||||
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
@ -115,16 +80,8 @@ public class ItemRenderGunAnim implements IItemRenderer {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(-0.3F, -0.4F, 0.15F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_lever_action_sonata) {
|
||||
GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(2.3F, 0.2F, 0.8F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_b92)
|
||||
b92.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunB92.getTransFromAnim(item));
|
||||
if(item.getItem() == ModItems.gun_b93)
|
||||
b93.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunB92.getTransFromAnim(item));
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelImmolator;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderImmolator implements IItemRenderer {
|
||||
|
||||
protected ModelImmolator swordModel;
|
||||
|
||||
public ItemRenderImmolator() {
|
||||
swordModel = new ModelImmolator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelImmolator.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
//GL11.glTranslatef(-0.4F, -0.1F, 0.1F);
|
||||
GL11.glTranslatef(-0.2F, -0.1F, -0.1F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelImmolator.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glTranslatef(-0.8F, 0.0F, 0.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,138 +0,0 @@
|
||||
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.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderLunaticSniper implements IItemRenderer {
|
||||
|
||||
public ItemRenderLunaticSniper() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_BOBBING || helper == ItemRendererHelper.ENTITY_ROTATION);
|
||||
}
|
||||
|
||||
static final String slide = "Slide_Cube.020_Cube.007";
|
||||
static final String everythingElse = "Full_Cylinder.007";
|
||||
static final String spentShell = "Spent_Casing_Casing";
|
||||
static final String fullRound = "Full_Round_Bullet";
|
||||
|
||||
static final float scale1 = 0.2F;
|
||||
static final float scale2 = 0.1F;
|
||||
static final float scale3 = 0.15F;
|
||||
static final float scale4 = 0.7F;
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
// double[] eject = HbmAnimations.getRelevantTransformation("EJECT");
|
||||
double[] tilt = HbmAnimations.getRelevantTransformation("TILT");
|
||||
// double[] insert = HbmAnimations.getRelevantTransformation("INSERT_ROUND");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lunatic_sniper_tex);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
switch (type) {
|
||||
case EQUIPPED_FIRST_PERSON:// In hand from POV
|
||||
|
||||
if(Minecraft.getMinecraft().thePlayer.isSneaking()) {
|
||||
GL11.glPopMatrix();
|
||||
return;
|
||||
}
|
||||
|
||||
GL11.glRotatef(-10F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(-10F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glRotatef(-58.5F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(90F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, 0F, 0F);
|
||||
GL11.glScalef(scale1, scale1, scale1);
|
||||
|
||||
/// Begin animations ///
|
||||
|
||||
// Move on recoil
|
||||
GL11.glTranslated(0, 0, recoil[1] * 10);
|
||||
GL11.glRotated(recoil[0] * 10, 0, 0, 1);
|
||||
// Move on reload
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(tilt[0] * 2, 0, 0, 1);
|
||||
GL11.glRotated(-tilt[1] * 2, 0, 1, 0);
|
||||
GL11.glTranslated(0, 0, -tilt[1] / 8);
|
||||
ResourceManager.lunatic_sniper.renderPart(everythingElse);
|
||||
GL11.glPopMatrix();
|
||||
// Release slide
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(tilt[0] * 2, 0, 0, 1);
|
||||
GL11.glRotated(-tilt[1] * 2, 0, 1, 0);
|
||||
GL11.glTranslated(0, 0, -tilt[2] * 15);
|
||||
ResourceManager.lunatic_sniper.renderPart(slide);
|
||||
GL11.glPopMatrix();
|
||||
// Drop in new round
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(tilt[0], 0, 0, 1);
|
||||
GL11.glTranslated(0, tilt[1], tilt[2]);
|
||||
ResourceManager.lunatic_sniper.renderPart(fullRound);
|
||||
GL11.glPopMatrix();
|
||||
// Eject casing
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 2, 0);//FIXME Where on earth is it?!
|
||||
// ResourceManager.lunatic_sniper.renderPart(spentShell);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:// In hand from other's POV
|
||||
GL11.glRotatef(-5F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(-5F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glRotatef(-50F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(90F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.05F, -0.2F, -0.75F);
|
||||
GL11.glScalef(scale2 - scale2 * 2, scale2, scale2);
|
||||
GL11.glPushMatrix();
|
||||
// GL11.glTranslated(eject[0] / 2, 0, -5);
|
||||
// ResourceManager.lunatic_sniper.renderPart(spentShell);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case ENTITY:// Dropped item
|
||||
GL11.glScalef(scale3, scale3, scale3);
|
||||
break;
|
||||
case INVENTORY:
|
||||
GL11.glTranslatef(10F, 11.5F, 0F);
|
||||
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-135F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(-scale4, scale4, scale4);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON) {
|
||||
ResourceManager.lunatic_sniper.renderAllExcept(fullRound, spentShell);
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderM2 extends ItemRenderBase {
|
||||
|
||||
public ItemRenderM2() { }
|
||||
|
||||
static final float scale1 = 0.35F, scale2 = 2.25F, scale3 = 0.25F, scale4 = 0.5F;
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
GL11.glTranslated(0, -0.25, 0);
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
GL11.glScalef(scale4, scale4, scale4);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
GL11.glScalef(scale1, scale1, -scale1);
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
GL11.glTranslatef(-0.4f, 0.5f, -5);
|
||||
GL11.glRotatef(30, 1, 0, 0);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
if (Minecraft.getMinecraft().thePlayer.isSneaking()) {
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
GL11.glTranslatef(-0.96f, -0.9f, -2);
|
||||
GL11.glRotatef(-5.75f, 0, 1, 1);// Just of by 0.15
|
||||
|
||||
/* vvv remove to restore original look vvv */
|
||||
GL11.glRotatef(1.9F, 0, 0, 1);
|
||||
GL11.glTranslatef(0.06F, 0, 0);
|
||||
GL11.glRotatef(-0.2F, 0, 1, 0);
|
||||
GL11.glRotatef(1F, 1, 0, 0);
|
||||
GL11.glTranslatef(0, 1.15F, -1.75F);
|
||||
|
||||
} else {
|
||||
GL11.glRotatef(-95, 0, 1, 0);
|
||||
GL11.glTranslatef(0, -1, -3);
|
||||
}
|
||||
GL11.glRotatef(25, 1, 0, 0);
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
GL11.glTranslated(0, 0, recoil[0] * 0.35);
|
||||
|
||||
break;
|
||||
case INVENTORY:
|
||||
GL11.glScalef(scale2, scale2, scale2);
|
||||
GL11.glTranslated(2.75, 5, 0);
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
GL11.glRotatef(-45, 1, 0, 0);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.m2_tex);
|
||||
ResourceManager.m2.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelMIRV;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderMIRV implements IItemRenderer {
|
||||
|
||||
protected ModelMIRV swordModel;
|
||||
|
||||
public ItemRenderMIRV() {
|
||||
swordModel = new ModelMIRV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/Mirv.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/Mirv.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelMIRVLauncher;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderMIRVLauncher implements IItemRenderer {
|
||||
|
||||
protected ModelMIRVLauncher swordModel;
|
||||
|
||||
public ItemRenderMIRVLauncher() {
|
||||
swordModel = new ModelMIRVLauncher();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/MIRVLauncher.png"));
|
||||
GL11.glRotatef(-150.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.8F, -0.1F, -0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/MIRVLauncher.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,73 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelMP;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderMP implements IItemRenderer {
|
||||
|
||||
protected ModelMP swordModel;
|
||||
|
||||
public ItemRenderMP() {
|
||||
swordModel = new ModelMP();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
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();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelMP.png"));
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glTranslatef(1.0F, 0.75F, 0.0F);
|
||||
GL11.glRotatef(150F, 0.0F, 0.0F, -1.0F);
|
||||
GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
GL11.glTranslatef(0.35F, 0.5F, 0.0F);
|
||||
GL11.glRotatef(100F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(170F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(15F, 0.0F, 0.0F, -1.0F);
|
||||
GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -1,76 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelMP40;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderMP40 implements IItemRenderer {
|
||||
|
||||
protected ModelMP40 swordModel;
|
||||
|
||||
public ItemRenderMP40() {
|
||||
swordModel = new ModelMP40();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelMP40.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
//GL11.glTranslatef(-0.4F, -0.1F, 0.1F);
|
||||
GL11.glTranslatef(-0.8F, -0.2F, 0.0F);
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelMP40.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(-1.8F, -0.2F, 0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelMiniNuke;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderMiniNuke implements IItemRenderer {
|
||||
|
||||
protected ModelMiniNuke swordModel;
|
||||
|
||||
public ItemRenderMiniNuke() {
|
||||
swordModel = new ModelMiniNuke();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/MiniNuke.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/MiniNuke.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,59 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
public class ItemRenderNukeGadget implements IItemRenderer {
|
||||
|
||||
private IModelCustom gadgetModel;
|
||||
private ResourceLocation gadgetTexture;
|
||||
float f = -1;
|
||||
|
||||
public ItemRenderNukeGadget() {
|
||||
gadgetModel = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/TheGadget3.obj"));
|
||||
gadgetTexture = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(gadgetTexture);
|
||||
//GL11.glRotatef(0.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(15.0F, 0.0F, 0.0F, -1.0F);
|
||||
GL11.glTranslatef(0.8F, 0.2F, 0.5F);
|
||||
GL11.glScalef(0.25F, 0.25F, 0.25F);
|
||||
gadgetModel.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,72 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelOSIPR;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderOSIPR implements IItemRenderer {
|
||||
|
||||
protected ModelOSIPR swordModel;
|
||||
|
||||
public ItemRenderOSIPR() {
|
||||
swordModel = new ModelOSIPR();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelOSIPR.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(-0.4F, -0.2F, -0.1F);
|
||||
GL11.glRotatef(-15.0F, 0.0F, 0.0F, 1.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelOSIPR.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
|
||||
//GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
GL11.glTranslatef(-0.4F, -0.1F, 0.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,271 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.ItemGunBase;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelDefabricator;
|
||||
import com.hbm.render.model.ModelEuthanasia;
|
||||
import com.hbm.render.model.ModelHP;
|
||||
import com.hbm.render.model.ModelJack;
|
||||
import com.hbm.render.model.ModelLacunae;
|
||||
import com.hbm.render.model.ModelSpark;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderOverkill implements IItemRenderer {
|
||||
|
||||
protected ModelJack powerJack;
|
||||
protected ModelSpark sparkPlug;
|
||||
protected ModelHP hppLaserjet;
|
||||
protected ModelEuthanasia euthanasia;
|
||||
protected ModelDefabricator defab;
|
||||
protected ModelLacunae lacunae;
|
||||
|
||||
public ItemRenderOverkill() {
|
||||
powerJack = new ModelJack();
|
||||
sparkPlug = new ModelSpark();
|
||||
hppLaserjet = new ModelHP();
|
||||
euthanasia = new ModelEuthanasia();
|
||||
defab = new ModelDefabricator();
|
||||
lacunae = new ModelLacunae();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
float f = 0;
|
||||
|
||||
if((Entity)data[1] instanceof EntityPlayer)
|
||||
f = ((EntityPlayer)data[1]).getItemInUseDuration();
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
if(item.getItem() == ModItems.gun_jack)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelJack.png"));
|
||||
if(item.getItem() == ModItems.gun_spark)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelSpark.png"));
|
||||
if(item.getItem() == ModItems.gun_hp)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelHP.png"));
|
||||
if(item.getItem() == ModItems.gun_euthanasia)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelEuthanasia.png"));
|
||||
if(item.getItem() == ModItems.gun_defabricator)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelDefabricator.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_pip)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPip.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_nopip)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipNoScope.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_blackjack)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipGrey.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_silver)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipSilver.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_red)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipRed.png"));
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeReal.png"));
|
||||
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
//GL11.glTranslatef(-0.4F, -0.1F, 0.1F);
|
||||
GL11.glTranslatef(-0.2F, -0.1F, -0.1F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_defabricator)
|
||||
GL11.glTranslatef(0, 0.5F, 0.4F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_revolver_pip ||
|
||||
item.getItem() == ModItems.gun_revolver_nopip ||
|
||||
item.getItem() == ModItems.gun_revolver_blackjack ||
|
||||
item.getItem() == ModItems.gun_revolver_silver ||
|
||||
item.getItem() == ModItems.gun_revolver_red) {
|
||||
GL11.glScalef(0.60F, 0.60F, 0.60F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, -0.1F);
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_lacunae) {
|
||||
GL11.glRotatef(-15.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
GL11.glTranslatef(0.5F, 0.3F, -0.2F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_jack)
|
||||
powerJack.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_spark)
|
||||
sparkPlug.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_hp)
|
||||
hppLaserjet.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_euthanasia)
|
||||
euthanasia.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_defabricator)
|
||||
defab.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
lacunae.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ItemGunBase.readNBT(item, "rot"));
|
||||
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
if(item.getItem() == ModItems.gun_jack)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelJack.png"));
|
||||
if(item.getItem() == ModItems.gun_spark)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelSpark.png"));
|
||||
if(item.getItem() == ModItems.gun_hp)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelHP.png"));
|
||||
if(item.getItem() == ModItems.gun_euthanasia)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelEuthanasia.png"));
|
||||
if(item.getItem() == ModItems.gun_defabricator)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelDefabricator.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_pip)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPip.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_nopip)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipNoScope.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_blackjack)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipGrey.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_silver)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipSilver.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_red)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipRed.png"));
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeReal.png"));
|
||||
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
|
||||
//GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
GL11.glTranslatef(-1.4F, 0.0F, 0.0F);
|
||||
if(item.getItem() == ModItems.gun_jack)
|
||||
GL11.glTranslatef(0.3F, 0, 0);
|
||||
if(item.getItem() == ModItems.gun_spark)
|
||||
GL11.glTranslatef(0.4F, 0, 0);
|
||||
if(item.getItem() == ModItems.gun_hp)
|
||||
GL11.glTranslatef(0.5F, 0.2F, 0);
|
||||
if(item.getItem() == ModItems.gun_defabricator)
|
||||
GL11.glTranslatef(0.5F, 0.6F, -0.2F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_revolver_pip ||
|
||||
item.getItem() == ModItems.gun_revolver_nopip ||
|
||||
item.getItem() == ModItems.gun_revolver_blackjack ||
|
||||
item.getItem() == ModItems.gun_revolver_silver ||
|
||||
item.getItem() == ModItems.gun_revolver_red) {
|
||||
GL11.glScalef(0.60F, 0.60F, 0.60F);
|
||||
GL11.glTranslatef(0.7F, 0.3F, 0.0F);
|
||||
}
|
||||
if(item.getItem() == ModItems.gun_lacunae) {
|
||||
GL11.glRotatef(5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(185, 0, 1, 0);
|
||||
GL11.glTranslatef(0.5F, 0.6F, 0.2F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_jack)
|
||||
powerJack.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_spark)
|
||||
sparkPlug.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_hp)
|
||||
hppLaserjet.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_euthanasia)
|
||||
euthanasia.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_defabricator)
|
||||
defab.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
lacunae.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
if(item.getItem() == ModItems.gun_jack)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelJack.png"));
|
||||
if(item.getItem() == ModItems.gun_spark)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelSpark.png"));
|
||||
if(item.getItem() == ModItems.gun_hp)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelHP.png"));
|
||||
if(item.getItem() == ModItems.gun_euthanasia)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelEuthanasia.png"));
|
||||
if(item.getItem() == ModItems.gun_defabricator)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelDefabricator.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_pip)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPip.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_nopip)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipNoScope.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_blackjack)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipGrey.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_silver)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipSilver.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_red)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipRed.png"));
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeReal.png"));
|
||||
|
||||
|
||||
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_revolver_pip ||
|
||||
item.getItem() == ModItems.gun_revolver_nopip ||
|
||||
item.getItem() == ModItems.gun_revolver_blackjack ||
|
||||
item.getItem() == ModItems.gun_revolver_silver ||
|
||||
item.getItem() == ModItems.gun_revolver_red) {
|
||||
GL11.glScalef(0.60F, 0.60F, 0.60F);
|
||||
}
|
||||
if(item.getItem() == ModItems.gun_calamity) {
|
||||
GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
}
|
||||
if(item.getItem() == ModItems.gun_lacunae) {
|
||||
GL11.glTranslatef(0, -1, 0);
|
||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_jack)
|
||||
powerJack.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_spark)
|
||||
sparkPlug.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_hp)
|
||||
hppLaserjet.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_euthanasia)
|
||||
euthanasia.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_defabricator)
|
||||
defab.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
lacunae.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,81 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelRevolver;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderRevolver implements IItemRenderer {
|
||||
|
||||
protected ModelRevolver swordModel;
|
||||
|
||||
public ItemRenderRevolver() {
|
||||
swordModel = new ModelRevolver();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if(item.getItem() == ModItems.gun_revolver)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolver.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_saturnite)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolverSaturnite.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
|
||||
//((EntityPlayer)data[1]).isSwingInProgress = false;
|
||||
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
if(item.getItem() == ModItems.gun_revolver)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolver.png"));
|
||||
if(item.getItem() == ModItems.gun_revolver_saturnite)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolverSaturnite.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelGun;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderRevolverCursed implements IItemRenderer {
|
||||
|
||||
protected ModelGun swordModel;
|
||||
|
||||
public ItemRenderRevolverCursed() {
|
||||
swordModel = new ModelGun();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelGun.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelGun.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelRevolver;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderRevolverGold implements IItemRenderer {
|
||||
|
||||
protected ModelRevolver swordModel;
|
||||
|
||||
public ItemRenderRevolverGold() {
|
||||
swordModel = new ModelRevolver();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolverGold.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolverGold.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,117 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.model.ModelRevolver;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderRevolverInverted implements IItemRenderer {
|
||||
|
||||
protected ModelRevolver swordModel;
|
||||
|
||||
public ItemRenderRevolverInverted() {
|
||||
swordModel = new ModelRevolver();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
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) {
|
||||
|
||||
boolean inUse = false;
|
||||
if(data != null && data.length > 1 && data[1] instanceof EntityPlayer)
|
||||
inUse = (((EntityPlayer)data[1]).getItemInUse() != null && ((EntityPlayer)data[1]).getItemInUse().getItemUseAction() == EnumAction.bow);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
double s0 = 1.5D;
|
||||
GL11.glTranslated(0.75, 0.5, 0);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
GL11.glRotated(100, 0, -1, 0);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
|
||||
if(inUse) {
|
||||
GL11.glTranslated(-0.4, 0, 0);
|
||||
GL11.glRotated(198, 0, 1, 0);
|
||||
GL11.glRotated(-10, 1, 0, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
double scale = 1.5D;
|
||||
GL11.glRotated(195, 0, 1, 0);
|
||||
GL11.glRotated(-10, 0, 0, 1);
|
||||
GL11.glRotated(-10, 1, 0, 0);
|
||||
GL11.glTranslated(-0.5, 0.1, -0.25);
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
if(inUse) {
|
||||
GL11.glTranslated(-0.05, 0, 0);
|
||||
GL11.glRotated(-15, 0, 0, 1);
|
||||
GL11.glRotated(160, 0, 1, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
|
||||
double s1 = 1D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
double s = 17D;
|
||||
GL11.glTranslated(8, 8, 0);
|
||||
GL11.glRotated(-135, 0, 0, 1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(s, s, -s);
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_gun_bright);
|
||||
ResourceManager.ff_python.renderPart("Body");
|
||||
ResourceManager.ff_python.renderPart("Cylinder");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_wood);
|
||||
ResourceManager.ff_python.renderPart("Grip");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_iron);
|
||||
ResourceManager.ff_python.renderPart("Hammer");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelRevolver;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderRevolverIron implements IItemRenderer {
|
||||
|
||||
protected ModelRevolver swordModel;
|
||||
|
||||
public ItemRenderRevolverIron() {
|
||||
swordModel = new ModelRevolver();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolverIron.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolverIron.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelRevolver;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderRevolverLead implements IItemRenderer {
|
||||
|
||||
protected ModelRevolver swordModel;
|
||||
|
||||
public ItemRenderRevolverLead() {
|
||||
swordModel = new ModelRevolver();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolverLead.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolverLead.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelRevolver;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderRevolverSchrabidium implements IItemRenderer {
|
||||
|
||||
protected ModelRevolver swordModel;
|
||||
|
||||
public ItemRenderRevolverSchrabidium() {
|
||||
swordModel = new ModelRevolver();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolverSchrabidium.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolverSchrabidium.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,102 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelGustav;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderRpg implements IItemRenderer {
|
||||
|
||||
protected ModelGustav swordModel;
|
||||
|
||||
public ItemRenderRpg() {
|
||||
swordModel = new ModelGustav();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
if(item.getItem() == ModItems.gun_rpg)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelGustav.png"));
|
||||
if(item.getItem() == ModItems.gun_karl)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelGustavYellow.png"));
|
||||
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(0.4F, -1.0F, -0.7F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_panzerschreck) {
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
|
||||
if(Minecraft.getMinecraft().thePlayer.isSneaking())
|
||||
GL11.glTranslatef(-0.2F, -0.3F, -0.5F);
|
||||
else
|
||||
GL11.glTranslatef(-0.1F, 0.0F, 0.0F);
|
||||
} else {
|
||||
GL11.glTranslatef(0F, -0.1F, -0.4F);
|
||||
}
|
||||
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_rpg)
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_karl)
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
if(item.getItem() == ModItems.gun_rpg)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelGustav.png"));
|
||||
if(item.getItem() == ModItems.gun_karl)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelGustavYellow.png"));
|
||||
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.9F, 0.0F, 0.1F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_panzerschreck) {
|
||||
GL11.glTranslatef(-0.5F, -0.1F, 0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_rpg)
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_karl)
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,84 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderStinger implements IItemRenderer {
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
ResourceLocation stingerTex = item.getItem() == ModItems.gun_stinger ? ResourceManager.stinger_tex : ResourceManager.sky_stinger_tex;
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(stingerTex);
|
||||
GL11.glPushMatrix();
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
double s0 = 0.25D;
|
||||
GL11.glRotated(25, 0, 0, 1);
|
||||
GL11.glTranslated(-0.5, -0.7, -0.5);
|
||||
GL11.glRotated(-100, 0, 1, 0);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
double scale = 0.25D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-170, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-15F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(-2F, -3F, 4.0F);
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
|
||||
double s1 = 0.2D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
GL11.glTranslatef(0F, -2.5F, 0F);
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
double s = 1.75D;
|
||||
GL11.glTranslated(4, 11, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(135, 1, 0, 0);
|
||||
GL11.glScaled(s, s, -s);
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
ResourceManager.stinger.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -1,109 +0,0 @@
|
||||
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 ItemRenderUACPistol implements IItemRenderer {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
return type == ItemRenderType.FIRST_PERSON_MAP ? false : true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_BOBBING || helper == ItemRendererHelper.ENTITY_ROTATION);
|
||||
}
|
||||
|
||||
static final String lower = "lower_pistol_0";
|
||||
static final String mag = "mag_pistol_0";
|
||||
static final String slide = "slide_pistol_0";
|
||||
static final String trigger = "trigger_pistol_0";
|
||||
static final String hammer = "bool_obj_bool_obj_data.002";
|
||||
|
||||
static final float scale1 = 0.05F;
|
||||
static final float scale2 = 0.025F;
|
||||
static final float scale3 = 0.05F;
|
||||
static final float scale4 = 0.55F;
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
GL11.glPushMatrix();
|
||||
mc.renderEngine.bindTexture(ResourceManager.uac_pistol_tex);
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
double[] slideAnim = HbmAnimations.getRelevantTransformation("SLIDE");
|
||||
double[] hammerAnim = HbmAnimations.getRelevantTransformation("HAMMER");
|
||||
|
||||
switch(type) {
|
||||
case ENTITY:// Dropped item
|
||||
GL11.glScalef(scale1, scale1, scale1);
|
||||
break;
|
||||
case EQUIPPED:// In hand from other's POV
|
||||
GL11.glScalef(scale2, scale2, scale2);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(-45F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0F, -12F, 30F);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
ResourceManager.uac_pistol.renderOnly(trigger, mag, lower);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(slideAnim[0], slideAnim[1], slideAnim[2] * 2);
|
||||
ResourceManager.uac_pistol.renderPart(slide);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(hammerAnim[0], 1F, 0F, 0F);
|
||||
ResourceManager.uac_pistol.renderPart(hammer);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:// In hand from POV
|
||||
GL11.glScalef(scale3, scale3, scale3);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
if(player.isSneaking()) {
|
||||
GL11.glRotatef(-25F, 1F, 0F, 0F);
|
||||
GL11.glRotatef(-5F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(20.15F, 3.5F, 18F);
|
||||
} else {
|
||||
GL11.glRotatef(-25F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(-3F, -5F, 20F);
|
||||
}
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(slideAnim[0], slideAnim[1], slideAnim[2] * 2);
|
||||
ResourceManager.uac_pistol.renderPart(slide);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(hammerAnim[0], 1F, 0F, 0F);
|
||||
ResourceManager.uac_pistol.renderPart(hammer);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case INVENTORY:
|
||||
GL11.glScalef(scale4, scale4, scale4);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(150F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0F, -8F, -24F);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON && type != ItemRenderType.EQUIPPED)
|
||||
ResourceManager.uac_pistol.renderAll();
|
||||
else
|
||||
ResourceManager.uac_pistol.renderOnly(trigger, mag, lower);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,135 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelUzi;
|
||||
import com.hbm.render.model.ModelUziBarrel;
|
||||
import com.hbm.render.model.ModelUziSilencer;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderUZI implements IItemRenderer {
|
||||
|
||||
protected ModelUzi uzi;
|
||||
protected ModelUziBarrel barrel;
|
||||
protected ModelUziSilencer silencer;
|
||||
|
||||
public ItemRenderUZI() {
|
||||
uzi = new ModelUzi();
|
||||
barrel = new ModelUziBarrel();
|
||||
silencer = new ModelUziSilencer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(0.25F, 0.25F, 0.25F);
|
||||
GL11.glTranslatef(-2.5F, -0.5F, -0.9F);
|
||||
|
||||
GL11.glRotatef(-15.0F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_uzi || item.getItem() == ModItems.gun_uzi_silencer)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUzi.png"));
|
||||
if(item.getItem() == ModItems.gun_uzi_saturnite || item.getItem() == ModItems.gun_uzi_saturnite_silencer)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziSaturnite.png"));
|
||||
|
||||
uzi.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_uzi || item.getItem() == ModItems.gun_uzi_saturnite) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziBarrel.png"));
|
||||
barrel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_uzi_silencer || item.getItem() == ModItems.gun_uzi_saturnite_silencer) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziSilencer.png"));
|
||||
silencer.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -0.8F, -1.0F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_uzi || item.getItem() == ModItems.gun_uzi_silencer)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUzi.png"));
|
||||
if(item.getItem() == ModItems.gun_uzi_saturnite || item.getItem() == ModItems.gun_uzi_saturnite_silencer)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziSaturnite.png"));
|
||||
uzi.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_uzi || item.getItem() == ModItems.gun_uzi_saturnite) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziBarrel.png"));
|
||||
barrel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_uzi_silencer || item.getItem() == ModItems.gun_uzi_saturnite_silencer) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziSilencer.png"));
|
||||
silencer.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_uzi || item.getItem() == ModItems.gun_uzi_silencer)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUzi.png"));
|
||||
if(item.getItem() == ModItems.gun_uzi_saturnite || item.getItem() == ModItems.gun_uzi_saturnite_silencer)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziSaturnite.png"));
|
||||
uzi.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
|
||||
if(item.getItem() == ModItems.gun_uzi || item.getItem() == ModItems.gun_uzi_saturnite) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziBarrel.png"));
|
||||
barrel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_uzi_silencer || item.getItem() == ModItems.gun_uzi_saturnite_silencer) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUziSilencer.png"));
|
||||
silencer.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,75 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelUboinik;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderUboinik implements IItemRenderer {
|
||||
|
||||
protected ModelUboinik swordModel;
|
||||
|
||||
public ItemRenderUboinik() {
|
||||
swordModel = new ModelUboinik();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUboinik.png"));
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
//GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
//GL11.glTranslatef(-0.4F, -0.1F, 0.1F);
|
||||
GL11.glTranslatef(-0.2F, -0.4F, -0.1F);
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
case ENTITY:
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelUboinik.png"));
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
|
||||
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
|
||||
GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
GL11.glTranslatef(-1.4F, 0.0F, 0.0F);
|
||||
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
|
||||
GL11.glPopMatrix();
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,153 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.ItemGunBase;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderWeaponBolter implements IItemRenderer {
|
||||
|
||||
public ItemRenderWeaponBolter() { }
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
case INVENTORY:
|
||||
return true;
|
||||
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);
|
||||
|
||||
if(item.getItem() == ModItems.gun_bolter)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bolter_tex);
|
||||
if(item.getItem() == ModItems.gun_bolter_digamma)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.bolter_digamma_tex);
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
double s0 = 0.25D;
|
||||
GL11.glRotated(25, 0, 0, 1);
|
||||
GL11.glTranslated(1.25, -0.25, -0.25);
|
||||
GL11.glRotated(-100, 0, 1, 0);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
GL11.glRotated(recoil[0] * 5, 1, 0, 0);
|
||||
GL11.glTranslated(0, 0, recoil[0]);
|
||||
|
||||
double[] tilt = HbmAnimations.getRelevantTransformation("TILT");
|
||||
GL11.glTranslated(0, tilt[0], 3);
|
||||
GL11.glRotated(tilt[0] * 35, 1, 0, 0);
|
||||
GL11.glTranslated(0, 0, -3);
|
||||
|
||||
ResourceManager.bolter.renderPart("Body");
|
||||
|
||||
double[] mag = HbmAnimations.getRelevantTransformation("MAG");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0, 5);
|
||||
GL11.glRotated(mag[0] * 60 * (mag[2] == 1 ? 2.5 : 1), -1, 0, 0);
|
||||
GL11.glTranslated(0, 0, -5);
|
||||
ResourceManager.bolter.renderPart("Mag");
|
||||
if(mag[2] != 1) ResourceManager.bolter.renderPart("Bullet");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
double[] casing = HbmAnimations.getRelevantTransformation("EJECT");
|
||||
GL11.glTranslated(casing[2] * 5, casing[2] * 2, 0);
|
||||
GL11.glRotated(casing[2] * 60, 1, 0, 0);
|
||||
ResourceManager.bolter.renderPart("Casing");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
double scale = 0.25D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-170, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-15F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(-2F, -0.9F, -0.75F);
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
|
||||
double s1 = 0.2D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
double s = 2.5D;
|
||||
GL11.glTranslated(6, 10, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(135, 1, 0, 0);
|
||||
GL11.glScaled(s, s, -s);
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON) {
|
||||
ResourceManager.bolter.renderAll();
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
|
||||
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
String s = ((ItemGunBase) item.getItem()).getMag(item) + "";
|
||||
float f3 = 0.04F;
|
||||
GL11.glTranslatef(0.025F - (font.getStringWidth(s) / 2) * 0.04F, 2.11F, 2.91F);
|
||||
GL11.glScalef(f3, -f3, f3);
|
||||
GL11.glRotatef(45, 1, 0, 0);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
font.drawString(s, 0, 0, 0xff0000);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -1,91 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderWeaponFFNightmareDark implements IItemRenderer {
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
case INVENTORY:
|
||||
return true;
|
||||
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);
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
double s0 = 0.4D;
|
||||
GL11.glTranslated(0.75, 0.45, 0);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
GL11.glRotated(170, 0, 1, 0);
|
||||
GL11.glRotated(25, 0, 0, -1);
|
||||
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
double scale = 0.4D;
|
||||
GL11.glRotated(105, 0, 1, 0);
|
||||
GL11.glRotated(-10, 1, 0, 0);
|
||||
GL11.glRotated(10, 0, 0, 1);
|
||||
GL11.glTranslated(-0.125, 0.1, 0.5);
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
|
||||
double s1 = 0.25D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
double s = 3D;
|
||||
GL11.glTranslated(10, 9, 0);
|
||||
GL11.glRotated(-135, 0, 0, 1);
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glScaled(s, s, -s);
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_nightmare_tex);
|
||||
ResourceManager.nightmare_dark.renderAll();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -1,178 +0,0 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.items.weapon.ItemEnergyGunBase;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderWeaponGlass implements IItemRenderer {
|
||||
|
||||
public ItemRenderWeaponGlass() { }
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
case INVENTORY:
|
||||
return true;
|
||||
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_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
double s0 = 0.5D;
|
||||
GL11.glRotated(25, 0, 0, 1);
|
||||
GL11.glTranslated(2.25, 0.0, 0.125);
|
||||
GL11.glRotatef(-10, 0, 1, 0);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
double scale = 0.25D;
|
||||
GL11.glScaled(-scale, scale, scale);
|
||||
GL11.glRotatef(20F, -3.0F, -0.75F, -1.0F);
|
||||
GL11.glRotatef(-170, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30F, 2.0F, -1F, -5.0F);
|
||||
GL11.glTranslatef(5F, -0.35F, 0.25F);
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
|
||||
double s1 = 0.5D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
|
||||
double s = 1.65D;
|
||||
GL11.glTranslatef(8F, 8F, 0F);
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
GL11.glRotated(135, 0, 0, 1);
|
||||
GL11.glScaled(s, s, s);
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(0.9F, 1.0F, 1.0F, 0.5F);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
ResourceManager.glass_cannon.renderPart("Gun");
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.glass_cannon_panel_tex);
|
||||
ResourceManager.glass_cannon.renderPart("Panel");
|
||||
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
int color = 0xFFFFFF;
|
||||
double freq = 1;
|
||||
|
||||
if(item.getItem() instanceof ItemEnergyGunBase) {
|
||||
BulletConfiguration config = ((ItemEnergyGunBase)item.getItem()).getConfig(item);
|
||||
String name = config.modeName;
|
||||
switch(name) {
|
||||
case "weapon.elecGun.glass_cannon.radio": color = 0xaa2200; freq = 0.5; break;
|
||||
case "weapon.elecGun.glass_cannon.micro": color = 0xdc221f; freq = 1; break;
|
||||
case "weapon.elecGun.glass_cannon.ir": color = 0xfc3d3a; freq = 1.5; break;
|
||||
case "weapon.elecGun.glass_cannon.visible": color = 0x8fe325; freq = 2; break;
|
||||
case "weapon.elecGun.glass_cannon.uv": color = 0x37d5f3; freq = 2.5; break;
|
||||
case "weapon.elecGun.glass_cannon.xray": color = 0x2542fd; freq = 3; break;
|
||||
case "weapon.elecGun.glass_cannon.gamma": color = 0xdc20f3; freq = 3.5; break;
|
||||
}
|
||||
}
|
||||
|
||||
float px = 0.0625F;
|
||||
GL11.glTranslatef(-2F, px * 18, -px * 14);
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
GL11.glTranslatef(-0.7F, -0.86F, -0.33F);
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawing(GL11.GL_QUADS);
|
||||
|
||||
int sub = 32;
|
||||
double width = px * 21.25;
|
||||
double len = width / sub;
|
||||
double time = System.currentTimeMillis() / -100D;
|
||||
double amplitude = 0.075;
|
||||
|
||||
tess.setColorOpaque_I(color);
|
||||
|
||||
for(int i = 0; i < sub; i++) {
|
||||
double h0 = Math.sin(freq * i * 0.5 + time) * amplitude;
|
||||
double h1 = Math.sin(freq * (i + 1) * 0.5 + time) * amplitude;
|
||||
tess.addVertex(0, -px * 0.25 + h1, len * (i + 1));
|
||||
tess.addVertex(0, px * 0.25 + h1, len * (i + 1));
|
||||
tess.addVertex(0, px * 0.25 + h0, len * i);
|
||||
tess.addVertex(0, -px * 0.25 + h0, len * i);
|
||||
}
|
||||
tess.setColorOpaque_F(1F, 1F, 1F);
|
||||
|
||||
tess.draw();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopAttrib();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user