40mm grenade items & model, recipes
@ -1383,6 +1383,12 @@ item.ammo_rocket_incendiary.name=84mm Rakete (Brand)
|
||||
item.ammo_rocket_shrapnel.name=84mm Rakete (Schrapnell)
|
||||
item.ammo_rocket_emp.name=84mm Rakete (Impuls)
|
||||
item.ammo_rocket_glare.name=84mm Rakete (Roter Schein)
|
||||
item.ammo_rocket_sleek.name=84mm Rakete (IF-R&D)
|
||||
item.ammo_grenade.name=40mm Granate
|
||||
item.ammo_grenade_he.name=40mm Granate (HE)
|
||||
item.ammo_grenade_incendiary.name=40mm Granate (Brand)
|
||||
item.ammo_grenade_toxic.name=40mm Granate (Chemisch)
|
||||
item.ammo_grenade_sleek.name=40mm Granate (IF-F&E)
|
||||
|
||||
item.folly_shell.name=Silberne Kanonenhülse
|
||||
item.folly_bullet.name=12,8cm Sternenmetall-Hochenergiegeschoss
|
||||
|
||||
@ -1383,6 +1383,12 @@ item.ammo_rocket_incendiary.name=84mm Rocket (Incendiary)
|
||||
item.ammo_rocket_shrapnel.name=84mm Rocket (Shrapnel)
|
||||
item.ammo_rocket_emp.name=84mm Rocket (Pulse)
|
||||
item.ammo_rocket_glare.name=84mm Rocket (Red Glare)
|
||||
item.ammo_rocket_sleek.name=84mm Rocket (IF-R&D)
|
||||
item.ammo_grenade.name=40mm Grenade
|
||||
item.ammo_grenade_he.name=40mm Grenade (HE)
|
||||
item.ammo_grenade_incendiary.name=40mm Grenade (Incendiary)
|
||||
item.ammo_grenade_toxic.name=40mm Grenade (Chemical)
|
||||
item.ammo_grenade_sleek.name=40mm Grenade (IF-R&D)
|
||||
|
||||
item.folly_shell.name=Silver Bullet Casing
|
||||
item.folly_bullet.name=12.8cm Starmetal High-Energy Shell
|
||||
|
||||
BIN
assets/hbm/textures/blocks/chlorine_gas.png
Normal file
|
After Width: | Height: | Size: 102 B |
BIN
assets/hbm/textures/blocks/vent_chlorine_seal_side.png
Normal file
|
After Width: | Height: | Size: 424 B |
BIN
assets/hbm/textures/blocks/vent_chlorine_seal_top.png
Normal file
|
After Width: | Height: | Size: 360 B |
BIN
assets/hbm/textures/entity/ModelGrenade.png
Normal file
|
After Width: | Height: | Size: 702 B |
BIN
assets/hbm/textures/entity/ModelGrenadeHE.png
Normal file
|
After Width: | Height: | Size: 873 B |
BIN
assets/hbm/textures/entity/ModelGrenadeIncendiary.png
Normal file
|
After Width: | Height: | Size: 867 B |
BIN
assets/hbm/textures/entity/ModelGrenadeSleek.png
Normal file
|
After Width: | Height: | Size: 823 B |
BIN
assets/hbm/textures/entity/ModelGrenadeToxic.png
Normal file
|
After Width: | Height: | Size: 868 B |
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 337 B |
|
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 322 B |
|
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 326 B |
|
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 327 B |
BIN
assets/hbm/textures/entity/buckshot.png
Normal file
|
After Width: | Height: | Size: 114 B |
BIN
assets/hbm/textures/entity/bullet.png
Normal file
|
After Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
BIN
assets/hbm/textures/items/ammo_grenade.png
Normal file
|
After Width: | Height: | Size: 288 B |
BIN
assets/hbm/textures/items/ammo_grenade_FG.png
Normal file
|
After Width: | Height: | Size: 232 B |
BIN
assets/hbm/textures/items/ammo_grenade_he.png
Normal file
|
After Width: | Height: | Size: 307 B |
BIN
assets/hbm/textures/items/ammo_grenade_incendiary.png
Normal file
|
After Width: | Height: | Size: 308 B |
BIN
assets/hbm/textures/items/ammo_grenade_sleek.png
Normal file
|
After Width: | Height: | Size: 285 B |
BIN
assets/hbm/textures/items/ammo_grenade_toxic.png
Normal file
|
After Width: | Height: | Size: 308 B |
BIN
assets/hbm/textures/items/ammo_rocket_sleek.png
Normal file
|
After Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 272 B |
@ -1,5 +1,6 @@
|
||||
package com.hbm.entity.grenade;
|
||||
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.ItemGrenade;
|
||||
|
||||
@ -31,6 +32,8 @@ public class EntityGrenadeIFMystery extends EntityGrenadeBouncyBase {
|
||||
this.setDead();
|
||||
|
||||
worldObj.newExplosion(this, posX, posY, posZ, 10, false, false);
|
||||
|
||||
ExplosionChaos.spawnVolley(worldObj, posX, posY, posZ, 100, 1.0D);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -226,10 +226,13 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
//handle block collision
|
||||
} else {
|
||||
|
||||
if(!config.isSpectral && !config.doesRicochet)
|
||||
boolean hRic = rand.nextInt(100) < config.HBRC;
|
||||
boolean doesRic = config.doesRicochet || hRic;
|
||||
|
||||
if(!config.isSpectral && !doesRic)
|
||||
this.setDead();
|
||||
|
||||
if(config.doesRicochet) {
|
||||
if(doesRic) {
|
||||
|
||||
Vec3 face = null;
|
||||
|
||||
@ -252,10 +255,11 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
|
||||
Vec3 vel = Vec3.createVectorHelper(motionX, motionY, motionZ);
|
||||
vel.normalize();
|
||||
|
||||
|
||||
boolean lRic = rand.nextInt(100) < config.LBRC;
|
||||
double angle = Math.abs(VectorUtil.getCrossAngle(vel, face) - 90);
|
||||
|
||||
if(angle <= 10000) {
|
||||
if(hRic || (angle <= config.ricochetAngle && lRic)) {
|
||||
switch(movement.sideHit) {
|
||||
case 0:
|
||||
case 1:
|
||||
@ -281,9 +285,9 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
this.posY += (movement.hitVec.yCoord - this.posY) * 0.6;
|
||||
this.posZ += (movement.hitVec.zCoord - this.posZ) * 0.6;
|
||||
|
||||
this.motionX *= 0.8;
|
||||
this.motionY *= 0.8;
|
||||
this.motionZ *= 0.8;
|
||||
this.motionX *= config.bounceMod;
|
||||
this.motionY *= config.bounceMod;
|
||||
this.motionZ *= config.bounceMod;
|
||||
|
||||
didBounce = true;
|
||||
}
|
||||
|
||||
@ -379,6 +379,21 @@ public class ExplosionChaos {
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnVolley(World world, double x, double y, double z, int count, double speed) {
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
EntityModFX fx = new EntityOrangeFX(world, x, y, z, 0.0, 0.0, 0.0);
|
||||
|
||||
fx.motionX = rand.nextGaussian() * speed;
|
||||
fx.motionZ = rand.nextGaussian() * speed;
|
||||
|
||||
fx.motionY = rand.nextDouble() * speed * 7.5D;
|
||||
|
||||
world.spawnEntityInWorld(fx);
|
||||
}
|
||||
}
|
||||
|
||||
public static void destruction(World world, int x, int y, int z) {
|
||||
|
||||
if (world.getBlock(x, y, z) == Blocks.bedrock || world.getBlock(x, y, z) == ModBlocks.reinforced_brick
|
||||
|
||||
@ -24,6 +24,9 @@ public class BulletConfigFactory {
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 10;
|
||||
bullet.HBRC = 2;
|
||||
bullet.LBRC = 90;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.incendiary = 0;
|
||||
@ -52,6 +55,9 @@ public class BulletConfigFactory {
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 5;
|
||||
bullet.HBRC = 2;
|
||||
bullet.LBRC = 95;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.incendiary = 0;
|
||||
@ -61,8 +67,8 @@ public class BulletConfigFactory {
|
||||
bullet.boxcar = false;
|
||||
bullet.boat = false;
|
||||
bullet.destroysBlocks = false;
|
||||
bullet.style = 0;
|
||||
bullet.plink = 1;
|
||||
bullet.style = BulletConfiguration.STYLE_NORMAL;
|
||||
bullet.plink = BulletConfiguration.PLINK_BULLET;
|
||||
bullet.instakill = false;
|
||||
|
||||
return bullet;
|
||||
@ -77,7 +83,10 @@ public class BulletConfigFactory {
|
||||
bullet.gravity = 0D;
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 3;
|
||||
bullet.ricochetAngle = 5;
|
||||
bullet.HBRC = 10;
|
||||
bullet.LBRC = 95;
|
||||
bullet.bounceMod = 0.8;
|
||||
bullet.doesPenetrate = false;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.incendiary = 0;
|
||||
@ -87,8 +96,8 @@ public class BulletConfigFactory {
|
||||
bullet.boxcar = false;
|
||||
bullet.boat = false;
|
||||
bullet.destroysBlocks = false;
|
||||
bullet.style = 0;
|
||||
bullet.plink = 1;
|
||||
bullet.style = BulletConfiguration.STYLE_PELLET;
|
||||
bullet.plink = BulletConfiguration.PLINK_BULLET;
|
||||
bullet.instakill = false;
|
||||
|
||||
return bullet;
|
||||
|
||||
@ -29,6 +29,12 @@ public class BulletConfiguration {
|
||||
public boolean doesRicochet;
|
||||
//the maximum angle at which the projectile should bounce
|
||||
public double ricochetAngle;
|
||||
//lower bound ricochet chance (below R angle)
|
||||
public int LBRC;
|
||||
//higher bound ricochet chance (above R angle)
|
||||
public int HBRC;
|
||||
//how much of the initial velocity is kept after bouncing
|
||||
public double bounceMod;
|
||||
|
||||
//whether or not the bullet should penetrate mobs
|
||||
public boolean doesPenetrate;
|
||||
@ -65,6 +71,7 @@ public class BulletConfiguration {
|
||||
public static final int STYLE_STINGER = 6;
|
||||
public static final int STYLE_NUKE = 7;
|
||||
public static final int STYLE_MIRV = 8;
|
||||
public static final int STYLE_GRENADE = 9;
|
||||
|
||||
public static final int PLINK_NONE = 0;
|
||||
public static final int PLINK_BULLET = 1;
|
||||
|
||||
@ -12,6 +12,8 @@ public class GunConfiguration {
|
||||
* restrictions must be applied in gun's logic, mechanism may be dysfunctional if these rules are ignored
|
||||
*/
|
||||
|
||||
//TODO: bind RoF and spread to ammo
|
||||
|
||||
//amount of ticks between each bullet
|
||||
public int rateOfFire;
|
||||
//greatest amount of pellets created each shot
|
||||
|
||||
@ -842,6 +842,12 @@ public class ModItems {
|
||||
public static Item ammo_rocket_shrapnel;
|
||||
public static Item ammo_rocket_emp;
|
||||
public static Item ammo_rocket_glare;
|
||||
public static Item ammo_rocket_sleek;
|
||||
public static Item ammo_grenade;
|
||||
public static Item ammo_grenade_he;
|
||||
public static Item ammo_grenade_incendiary;
|
||||
public static Item ammo_grenade_toxic;
|
||||
public static Item ammo_grenade_sleek;
|
||||
|
||||
public static Item gun_rpg;
|
||||
public static Item gun_rpg_ammo;
|
||||
@ -2280,6 +2286,12 @@ public class ModItems {
|
||||
ammo_rocket_shrapnel = new Item().setUnlocalizedName("ammo_rocket_shrapnel").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_shrapnel");
|
||||
ammo_rocket_emp = new Item().setUnlocalizedName("ammo_rocket_emp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_emp");
|
||||
ammo_rocket_glare = new Item().setUnlocalizedName("ammo_rocket_glare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_glare");
|
||||
ammo_rocket_sleek = new Item().setUnlocalizedName("ammo_rocket_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_sleek");
|
||||
ammo_grenade = new Item().setUnlocalizedName("ammo_grenade").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade");
|
||||
ammo_grenade_he = new Item().setUnlocalizedName("ammo_grenade_he").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_he");
|
||||
ammo_grenade_incendiary = new Item().setUnlocalizedName("ammo_grenade_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_incendiary");
|
||||
ammo_grenade_toxic = new Item().setUnlocalizedName("ammo_grenade_toxic").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_toxic");
|
||||
ammo_grenade_sleek = new Item().setUnlocalizedName("ammo_grenade_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_sleek");
|
||||
|
||||
gun_rpg = new GunRpg().setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg_new");
|
||||
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_alt");
|
||||
@ -4005,6 +4017,12 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ammo_rocket_shrapnel, ammo_rocket_shrapnel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_emp, ammo_rocket_emp.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_glare, ammo_rocket_glare.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_sleek, ammo_rocket_sleek.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_grenade, ammo_grenade.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_grenade_he, ammo_grenade_he.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_grenade_incendiary, ammo_grenade_incendiary.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_grenade_toxic, ammo_grenade_toxic.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_grenade_sleek, ammo_grenade_sleek.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_folly, ammo_folly.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_folly_nuclear, ammo_folly_nuclear.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_folly_du, ammo_folly_du.getUnlocalizedName());
|
||||
|
||||
@ -750,8 +750,8 @@ public class CraftingManager {
|
||||
|
||||
public static void reg2() {
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " MW", 'S', "plateSteel", 'W', "plateIron", 'M', ModItems.mechanism_launcher_1 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg_ammo, 8), new Object[] { "SI ", "ITI", " I ", 'S', "plateSteel", 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron", 'M', ModItems.mechanism_launcher_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " MW", 'S', ModItems.hull_small_steel, 'W', "plateIron", 'M', ModItems.mechanism_launcher_1 }));
|
||||
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg_ammo, 8), new Object[] { "SI ", "ITI", " I ", 'S', "plateSteel", 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron", 'M', ModItems.mechanism_launcher_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "SSW", "CMW", 'S', "plateSteel", 'W', "plateTitanium", 'C', ModItems.circuit_red_copper, 'M', ModItems.mechanism_launcher_2 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_stinger_ammo, 4), new Object[] { "SS ", "STI", " IR", 'S', "plateSteel", 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateAluminum", 'R', "dustRedstone" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSM", " RW", 'S', "plateSteel", 'W', "plankWood", 'R', ModItems.wire_aluminium, 'M', ModItems.mechanism_revolver_1 }));
|
||||
@ -892,6 +892,11 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_shrapnel, 1), new Object[] { "G", "R", 'G', ModItems.pellet_buckshot, 'R', ModItems.ammo_rocket });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_glare, 1), new Object[] { "GGG", "GRG", "GGG", 'G', Items.redstone, 'R', ModItems.ammo_rocket });
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade, 2), new Object[] { " T ", "GCI", " P ", 'T', Items.gunpowder, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_he, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', Blocks.tnt });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_incendiary, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.powder_fire });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_toxic, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.powder_poison });
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_357, 1), new Object[] { "RSR", "III", " C ", 'R', "dustRedstone", 'S', ModItems.stamp_iron_flat, 'I', ModItems.plate_polymer, 'C', ModItems.casing_357 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_44, 1), new Object[] { "RSR", "III", " C ", 'R', "dustRedstone", 'S', ModItems.stamp_iron_flat, 'I', ModItems.plate_polymer, 'C', ModItems.casing_44 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stamp_9, 1), new Object[] { "RSR", "III", " C ", 'R', "dustRedstone", 'S', ModItems.stamp_iron_flat, 'I', ModItems.plate_polymer, 'C', ModItems.casing_9 }));
|
||||
|
||||
@ -5,8 +5,11 @@ import java.util.Random;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelBuckshot;
|
||||
import com.hbm.render.model.ModelBullet;
|
||||
import com.hbm.render.model.ModelGrenade;
|
||||
import com.hbm.render.model.ModelRocket;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@ -17,11 +20,15 @@ import net.minecraft.util.ResourceLocation;
|
||||
public class RenderBullet extends Render {
|
||||
|
||||
private ModelBullet bullet;
|
||||
private ModelBuckshot buckshot;
|
||||
private ModelRocket rocket;
|
||||
private ModelGrenade grenade;
|
||||
|
||||
public RenderBullet() {
|
||||
bullet = new ModelBullet();
|
||||
buckshot = new ModelBuckshot();
|
||||
rocket = new ModelRocket();
|
||||
grenade = new ModelGrenade();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -36,8 +43,21 @@ public class RenderBullet extends Render {
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
|
||||
GL11.glRotatef(new Random(bullet.getEntityId()).nextInt(360), 1.0F, 0.0F, 0.0F);
|
||||
|
||||
int style = bullet.getDataWatcher().getWatchableObjectByte(16);
|
||||
int trail = bullet.getDataWatcher().getWatchableObjectByte(17);
|
||||
|
||||
switch(style) {
|
||||
case BulletConfiguration.STYLE_NORMAL: renderBullet(trail); break;
|
||||
case BulletConfiguration.STYLE_BOLT: renderDart(0.25F, 0.0F, 0.75F); break;
|
||||
case BulletConfiguration.STYLE_FLECHETTE: renderFlechette(); break;
|
||||
case BulletConfiguration.STYLE_FOLLY: renderBullet(trail); break;
|
||||
case BulletConfiguration.STYLE_PELLET: renderBuckshot(); break;
|
||||
case BulletConfiguration.STYLE_ROCKET: renderRocket(trail); break;
|
||||
case BulletConfiguration.STYLE_GRENADE: renderGrenade(trail); break;
|
||||
default: renderBullet(trail); break;
|
||||
}
|
||||
|
||||
renderDart(0.75F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@ -55,28 +75,55 @@ public class RenderBullet extends Render {
|
||||
bullet.renderAll(0.0625F);
|
||||
}
|
||||
|
||||
private void renderBuckshot() {
|
||||
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/buckshot.png"));
|
||||
|
||||
buckshot.renderAll(0.0625F);
|
||||
}
|
||||
|
||||
private void renderRocket(int type) {
|
||||
|
||||
switch(type) {
|
||||
case 0:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/ModelRocket.png")); break;
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelRocket.png")); break;
|
||||
case 1:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/ModelRocketHE.png")); break;
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelRocketHE.png")); break;
|
||||
case 2:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/ModelRocketIncendiary.png")); break;
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelRocketIncendiary.png")); break;
|
||||
case 3:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/ModelRocketShrapnel.png")); break;
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelRocketShrapnel.png")); break;
|
||||
case 4:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/ModelRocketEMP.png")); break;
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelRocketEMP.png")); break;
|
||||
case 5:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/ModelRocketGlare.png")); break;
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelRocketGlare.png")); break;
|
||||
case 6:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/ModelRocketSleek.png")); break;
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelRocketSleek.png")); break;
|
||||
}
|
||||
|
||||
rocket.renderAll(0.0625F);
|
||||
}
|
||||
|
||||
private void renderGrenade(int type) {
|
||||
|
||||
GL11.glScalef(0.25F, 0.25F, 0.25F);
|
||||
|
||||
switch(type) {
|
||||
case 0:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelGrenade.png")); break;
|
||||
case 1:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelGrenadeHE.png")); break;
|
||||
case 2:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelGrenadeIncendiary.png")); break;
|
||||
case 3:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelGrenadeToxic.png")); break;
|
||||
case 4:
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelGrenadeSleek.png")); break;
|
||||
}
|
||||
|
||||
grenade.renderAll(0.0625F);
|
||||
}
|
||||
|
||||
private void renderFlechette() {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
45
com/hbm/render/model/ModelBuckshot.java
Normal file
@ -0,0 +1,45 @@
|
||||
package com.hbm.render.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelBuckshot extends ModelBase {
|
||||
|
||||
ModelRenderer bullet;
|
||||
|
||||
public ModelBuckshot() {
|
||||
textureWidth = 4;
|
||||
textureHeight = 4;
|
||||
|
||||
bullet = new ModelRenderer(this, 0, 0);
|
||||
bullet.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
bullet.setRotationPoint(1F, -0.5F, -0.5F);
|
||||
bullet.setTextureSize(4, 4);
|
||||
bullet.mirror = true;
|
||||
setRotation(bullet, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
bullet.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
public void renderAll(float f5) {
|
||||
bullet.render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
67
com/hbm/render/model/ModelGrenade.java
Normal file
@ -0,0 +1,67 @@
|
||||
// Date: 23.01.2019 10:30:04
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelGrenade extends ModelBase {
|
||||
// fields
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
|
||||
public ModelGrenade() {
|
||||
textureWidth = 32;
|
||||
textureHeight = 32;
|
||||
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 8, 8, 8);
|
||||
Shape1.setRotationPoint(-4F, -4F, -4F);
|
||||
Shape1.setTextureSize(32, 32);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 0, 16);
|
||||
Shape2.addBox(0F, 0F, 0F, 4, 6, 6);
|
||||
Shape2.setRotationPoint(-8F, -3F, -3F);
|
||||
Shape2.setTextureSize(32, 32);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
Shape3 = new ModelRenderer(this, 20, 16);
|
||||
Shape3.addBox(0F, 0F, 0F, 1, 4, 4);
|
||||
Shape3.setRotationPoint(-9F, -2F, -2F);
|
||||
Shape3.setTextureSize(32, 32);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
}
|
||||
|
||||
public void renderAll(float f5) {
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
}
|
||||
@ -6,6 +6,8 @@
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
@ -260,6 +262,7 @@ public class ModelGustav extends ModelBase {
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
@ -294,6 +297,7 @@ public class ModelGustav extends ModelBase {
|
||||
Shape32.render(f5);
|
||||
Shape33.render(f5);
|
||||
Shape34.render(f5);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
|
||||