Fat mine, saturnite rifle, explosion sounds for MK4

This commit is contained in:
HbmMods 2018-09-04 00:00:55 +02:00
parent 586adbb819
commit 2f2b655e5a
23 changed files with 1304 additions and 9 deletions

View File

@ -252,6 +252,7 @@ item.turret_biometry.name=Geschütz-Telemetriekarte
tile.mine_ap.name=Antipersonenmine
tile.mine_he.name=Antipanzermine
tile.mine_shrap.name=Schrapnellmine
tile.mine_fat.name=Fat Mine
item.defuser.name=High-Tech Bombenentschärfungsgerät
tile.bomb_multi.name=Mehrzweckbombe
@ -1128,7 +1129,8 @@ item.gun_lever_action.name=Mare's Leg (Original)
item.gun_bolt_action.name=Dream-Repetiergewehr (Original)
item.gun_lever_action_dark.name=Mare's Leg (Dunkel)
item.gun_bolt_action_green.name=Dream-Repetiergewehr (Grün)
item.gun_lever_action_sonata.name=Flipped Mare's Leg
item.gun_bolt_action_saturnite.name=Saturnitbüchse
item.gun_lever_action_sonata.name=Verkehrter Mare's Leg
item.gun_lever_action_sonata_2.name=§cSonatas Mikrophon§r
item.gun_b92.name=§9B92 Energiepistole§r
item.gun_b93.name=§cB93 Energiemod§r

View File

@ -265,6 +265,7 @@ item.turret_biometry.name=Turret Telemetry Card
tile.mine_ap.name=Anti-Personell Mine
tile.mine_he.name=Anti-Tank Mine
tile.mine_shrap.name=Shrapnel Mine
tile.mine_fat.name=Fat Mine
item.defuser.name=High-Tech Bomb Defusing Device
tile.crate.name=Supply Crate
@ -1128,6 +1129,7 @@ item.gun_lever_action.name=Mare's Leg (Original)
item.gun_bolt_action.name=Dream Bolt-Action Rifle (Original)
item.gun_lever_action_dark.name=Mare's Leg (Dark)
item.gun_bolt_action_green.name=Dream Bolt-Action Rifle (Green)
item.gun_bolt_action_saturnite.name=Saturnite Rifle
item.gun_lever_action_sonata.name=Flipped Mare's Leg
item.gun_lever_action_sonata_2.name=§cSonata's Microphone§r
item.gun_b92.name=§9B92 Energy Pistol§r

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -183,6 +183,7 @@ public class ModBlocks {
public static Block mine_ap;
public static Block mine_he;
public static Block mine_shrap;
public static Block mine_fat;
public static Block crate;
public static Block crate_weapon;
@ -722,6 +723,7 @@ public class ModBlocks {
mine_ap = new Landmine(Material.iron).setBlockName("mine_ap").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_ap");
mine_he = new Landmine(Material.iron).setBlockName("mine_he").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_he");
mine_shrap = new Landmine(Material.iron).setBlockName("mine_shrap").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_shrap");
mine_fat = new Landmine(Material.iron).setBlockName("mine_fat").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_fat");
machine_difurnace_off = new MachineDiFurnace(false).setBlockName("machine_difurnace_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
machine_difurnace_on = new MachineDiFurnace(true).setBlockName("machine_difurnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
@ -1145,6 +1147,7 @@ public class ModBlocks {
GameRegistry.registerBlock(mine_ap, mine_ap.getUnlocalizedName());
GameRegistry.registerBlock(mine_he, mine_he.getUnlocalizedName());
GameRegistry.registerBlock(mine_shrap, mine_shrap.getUnlocalizedName());
GameRegistry.registerBlock(mine_fat, mine_fat.getUnlocalizedName());
//Wot
GameRegistry.registerBlock(cel_prime, cel_prime.getUnlocalizedName());

View File

@ -3,10 +3,14 @@ package com.hbm.blocks.bomb;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.logic.EntityNukeExplosionMK4;
import com.hbm.explosion.ExplosionChaos;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.explosion.ExplosionParticle;
import com.hbm.explosion.ExplosionParticleB;
import com.hbm.interfaces.IBomb;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.bomb.TileEntityLandmine;
import net.minecraft.block.Block;
@ -27,6 +31,7 @@ import net.minecraft.world.World;
public class Landmine extends BlockContainer implements IBomb {
public static boolean safeMode = false;
static Random rand = new Random();;
public Landmine(Material p_i45386_1_) {
super(p_i45386_1_);
@ -67,6 +72,8 @@ public class Landmine extends BlockContainer implements IBomb {
this.setBlockBounds(4 * f, 0.0F, 4 * f, 12 * f, 2 * f, 12 * f);
if (this == ModBlocks.mine_shrap)
this.setBlockBounds(4 * f, 0.0F, 4 * f, 12 * f, 2 * f, 12 * f);
if (this == ModBlocks.mine_fat)
this.setBlockBounds(5 * f, 0.0F, 4 * f, 11 * f, 6 * f, 12 * f);
}
@Override
@ -78,6 +85,8 @@ public class Landmine extends BlockContainer implements IBomb {
this.setBlockBounds(4 * f, 0.0F, 4 * f, 12 * f, 2 * f, 12 * f);
if (this == ModBlocks.mine_shrap)
this.setBlockBounds(4 * f, 0.0F, 4 * f, 12 * f, 2 * f, 12 * f);
if (this == ModBlocks.mine_fat)
this.setBlockBounds(5 * f, 0.0F, 4 * f, 11 * f, 6 * f, 12 * f);
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY,
z + this.maxZ);
}
@ -167,6 +176,21 @@ public class Landmine extends BlockContainer implements IBomb {
ExplosionLarge.spawnShrapnelShower(world, x + 0.5, y + 0.5, z + 0.5, 0, 1D, 0, 45, 0.2D);
ExplosionLarge.spawnShrapnels(world, x + 0.5, y + 0.5, z + 0.5, 5);
}
if (this == ModBlocks.mine_fat) {
world.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(world, MainRegistry.fatmanRadius, x + 0.5, y + 0.5, z + 0.5));
if(MainRegistry.polaroidID == 11) {
ExplosionParticleB.spawnMush(world, x + 0.5, y - 3, z + 0.5);
} else {
if(rand.nextInt(100) == 0)
{
ExplosionParticleB.spawnMush(world, x + 0.5, y - 3, z + 0.5);
} else {
ExplosionParticle.spawnMush(world, x + 0.5, y - 3, z + 0.5);
}
}
}
}
}

View File

@ -45,6 +45,10 @@ public class EntityNukeExplosionMK4 extends Entity {
return;
}
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
if(rand.nextInt(5) == 0)
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
ExplosionNukeGeneric.dealDamage(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.length * 2);
if(explosion == null) {

View File

@ -167,7 +167,8 @@ public class ExplosionNukeGeneric {
// entity.attackEntityFrom(DamageSource.generic,
// ((int)((d11 * d11 + d11) / 2.0D * 8.0D *
// bombStartStrength + 1.0D)));
entity.attackEntityFrom(ModDamageSource.nuclearBlast, 10F);
double damage = entity.getDistance(x, y, z) / bombStartStrength * 250;
entity.attackEntityFrom(ModDamageSource.nuclearBlast, (float)damage);
entity.setFire(5);
double d8 = EnchantmentProtection.func_92092_a(entity, d11);
entity.motionX += d5 * d8 * 0.2D;

View File

@ -6,7 +6,7 @@ import net.minecraft.world.World;
public class ExplosionParticle {
public static void spawnMush(World world, int x, int y, int z)
public static void spawnMush(World world, double x, double y, double z)
{
x -= 6;
z -= 6;

View File

@ -6,7 +6,7 @@ import net.minecraft.world.World;
public class ExplosionParticleB {
public static void spawnMush(World world, int x, int y, int z)
public static void spawnMush(World world, double x, double y, double z)
{
x -= 6;
z -= 6;

View File

@ -1721,6 +1721,9 @@ public class MachineRecipes {
case CMB_PLATE:
list.add(new ItemStack(ModItems.ingot_combine_steel, 1));
break;
case SATURN_PLATE:
list.add(new ItemStack(ModItems.ingot_saturnite, 1));
break;
case ALUMINIUM_WIRE:
list.add(new ItemStack(ModItems.ingot_aluminium, 1));
break;
@ -3418,6 +3421,9 @@ public class MachineRecipes {
case CMB_PLATE:
output = new ItemStack(ModItems.plate_combine_steel, 2);
break;
case SATURN_PLATE:
output = new ItemStack(ModItems.plate_saturnite, 2);
break;
case ALUMINIUM_WIRE:
output = new ItemStack(ModItems.wire_aluminium, 6);
break;

View File

@ -760,6 +760,7 @@ public class ModItems {
public static Item gun_lever_action_ammo;
public static Item gun_bolt_action;
public static Item gun_bolt_action_green;
public static Item gun_bolt_action_saturnite;
public static Item gun_bolt_action_ammo;
public static Item gun_b92;
public static Item gun_b92_ammo;
@ -1996,6 +1997,7 @@ public class ModItems {
gun_bolt_action_ammo = new Item().setUnlocalizedName("gun_bolt_action_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_ammo");
gun_bolt_action = new GunBoltAction().setUnlocalizedName("gun_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action");
gun_bolt_action_green = new GunBoltAction().setUnlocalizedName("gun_bolt_action_green").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_green");
gun_bolt_action_saturnite = new GunBoltAction().setUnlocalizedName("gun_bolt_action_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_saturnite");
gun_b92_ammo = new GunB92Cell().setUnlocalizedName("gun_b92_ammo").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92_ammo_alt");
gun_b92 = new GunB92().setUnlocalizedName("gun_b92").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92");
gun_b93 = new GunB93().setUnlocalizedName("gun_b93").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b93");
@ -3385,6 +3387,7 @@ public class ModItems {
GameRegistry.registerItem(gun_lever_action_sonata, gun_lever_action_sonata.getUnlocalizedName());
GameRegistry.registerItem(gun_bolt_action, gun_bolt_action.getUnlocalizedName());
GameRegistry.registerItem(gun_bolt_action_green, gun_bolt_action_green.getUnlocalizedName());
GameRegistry.registerItem(gun_bolt_action_saturnite, gun_bolt_action_saturnite.getUnlocalizedName());
GameRegistry.registerItem(gun_xvl1456, gun_xvl1456.getUnlocalizedName());
GameRegistry.registerItem(gun_osipr, gun_osipr.getUnlocalizedName());
GameRegistry.registerItem(gun_immolator, gun_immolator.getUnlocalizedName());

View File

@ -26,6 +26,7 @@ public class ItemAssemblyTemplate extends Item {
ADVANCED_PLATE,
SCHRABIDIUM_PLATE,
CMB_PLATE,
SATURN_PLATE,
MIXED_PLATE,
ALUMINIUM_WIRE,
COPPER_WIRE,
@ -356,6 +357,8 @@ public class ItemAssemblyTemplate extends Item {
return 30;
case CMB_PLATE:
return 30;
case SATURN_PLATE:
return 30;
case MIXED_PLATE:
return 50;
case ALUMINIUM_WIRE:

View File

@ -38,6 +38,11 @@ public class GunBoltAction extends Item {
this.setMaxDamage(750);
if(this == ModItems.gun_bolt_action_green)
this.setMaxDamage(500);
if(this == ModItems.gun_bolt_action_saturnite) {
this.setMaxDamage(2500);
dmgMin = 24;
dmgMax = 36;
}
}
/**
@ -69,6 +74,9 @@ public class GunBoltAction extends Item {
EntityBullet entityarrow1;
entityarrow1 = new EntityBullet(p_77615_2_, p_77615_3_, 3.0F, dmgMin, dmgMax, false, false);
entityarrow1.setDamage(dmgMin + rand.nextInt(dmgMax - dmgMin));
if(this == ModItems.gun_bolt_action_saturnite)
entityarrow1.fire = true;
p_77615_1_.damageItem(1, p_77615_3_);
@ -161,9 +169,18 @@ public class GunBoltAction extends Item {
if(this == ModItems.gun_bolt_action_green) {
list.add("Floppy disks and pink, flashy orbs.");
}
if(this == ModItems.gun_bolt_action_saturnite) {
list.add("Shiny shooter made from D-25A alloy.");
}
list.add("");
list.add("Ammo: 12x74 Slug");
list.add("Damage: 16 - 28");
if(this == ModItems.gun_bolt_action_saturnite) {
list.add("Damage: 24 - 36");
list.add("Sets enemy on fire.");
} else {
list.add("Damage: 16 - 28");
}
}
@Override
@ -256,6 +273,9 @@ public class GunBoltAction extends Item {
@Override
public EnumRarity getRarity(ItemStack p_77613_1_) {
if(this == ModItems.gun_bolt_action_saturnite)
return EnumRarity.rare;
return EnumRarity.uncommon;
}
}

View File

@ -209,6 +209,7 @@ public class ClientProxy extends ServerProxy
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lever_action_dark, new ItemRenderGunAnim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolt_action_green, new ItemRenderGunAnim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lever_action_sonata, new ItemRenderGunAnim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolt_action_saturnite, new ItemRenderGunAnim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_b92, new ItemRenderGunAnim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_b93, new ItemRenderGunAnim());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_uzi, new ItemRenderUZI());

View File

@ -754,6 +754,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_lever_action_ammo, 6), new Object[] { "P", "S", "G", 'P', ModItems.pellet_buckshot, 'S', "plateCopper", 'G', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action, 1), new Object[] { "PPI", "SWD", 'P', "plateSteel", 'I', ModItems.mechanism_rifle_1, 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_copper }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_green, 1), new Object[] { "PPI", "SWD", 'P', "plateIron", 'I', ModItems.mechanism_rifle_1, 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_copper }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_saturnite, 1), new Object[] { "PPI", "SWD", 'P', "plateSaturnite", 'I', ModItems.mechanism_rifle_1, 'S', Items.stick, 'D', "plankWood", 'W', ModItems.wire_tungsten }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bolt_action_ammo, 2), new Object[] { "P", "S", "G", 'P', "nuggetLead", 'S', ModItems.plate_polymer, 'G', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_b92, 1), new Object[] { "SSS", " EP", 'P', "ingotPolymer", 'S', ModItems.ingot_starmetal, 'E', ModItems.powder_spark_mix }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_b92_ammo, 1), new Object[] { "PSP", "ESE", "PSP", 'P', "plateSteel", 'S', ModItems.ingot_starmetal, 'E', ModItems.powder_spark_mix }));
@ -1241,6 +1242,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_ap, 4), new Object[] { "C", "P", "T", 'C', ModItems.circuit_targeting_tier2, 'P', "plateIron", 'T', Blocks.tnt }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_he, 1), new Object[] { " C ", "PTP", 'C', ModItems.circuit_targeting_tier2, 'P', "plateSteel", 'T', Blocks.tnt }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_shrap, 2), new Object[] { "LLL", " C ", "PTP", 'C', ModItems.circuit_targeting_tier2, 'P', "plateSteel", 'T', ModBlocks.det_cord, 'L', ModItems.pellet_buckshot }));
GameRegistry.addRecipe(new ItemStack(ModBlocks.mine_fat, 1), new Object[] { "CDN", 'C', ModItems.circuit_targeting_tier2, 'D', ModItems.ducttape, 'N', ModItems.gun_fatman_ammo });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.defuser, 1), new Object[] { " PS", "P P", " P ", 'P', "ingotPolymer", 'S', "plateSteel" }));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.syringe_taint), new Object[] { ModItems.bottle2_empty, ModItems.syringe_metal_empty, ModItems.ducttape, ModItems.powder_magic, "nuggetSchrabidium", Items.potionitem }));

View File

@ -37,6 +37,7 @@ public class ResourceManager {
//Landmines
public static final IModelCustom mine_ap = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_ap.obj"));
public static final IModelCustom mine_he = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_he.obj"));
public static final IModelCustom mine_fat = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_fat.obj"));
//Pumpjack
public static final IModelCustom pumpjack_base = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/pumpjack_base.obj"));
@ -136,6 +137,7 @@ public class ResourceManager {
public static final ResourceLocation mine_ap_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_ap.png");
public static final ResourceLocation mine_he_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_he.png");
public static final ResourceLocation mine_shrap_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_shrap.png");
public static final ResourceLocation mine_fat_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_fat.png");
//Pumpjack
public static final ResourceLocation pumpjack_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/pumpjack_base.png");

View File

@ -77,6 +77,8 @@ public class ItemRenderGunAnim implements IItemRenderer {
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)
@ -105,7 +107,7 @@ public class ItemRenderGunAnim implements IItemRenderer {
GL11.glTranslatef(0.0F, GunLeverActionS.getOffsetFromAnim(item) * -1.5F, 0.0F);
}
if((item.getItem() == ModItems.gun_bolt_action || item.getItem() == ModItems.gun_bolt_action_green) && GunBoltAction.getRotationFromAnim(item) > 0) {
if((item.getItem() == ModItems.gun_bolt_action || item.getItem() == ModItems.gun_bolt_action_green || item.getItem() == ModItems.gun_bolt_action_saturnite) && GunBoltAction.getRotationFromAnim(item) > 0) {
GL11.glRotatef(GunBoltAction.getRotationFromAnim(item) * 10, 2.5F, 0.0F, 1.5F);
GL11.glTranslatef(GunBoltAction.getOffsetFromAnim(item) * -1.75F, 0.0F, 0.0F);
}
@ -126,7 +128,7 @@ public class ItemRenderGunAnim implements IItemRenderer {
leveraction.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunLeverAction.getRotationFromAnim(item));
if(item.getItem() == ModItems.gun_lever_action_sonata)
leveraction.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunLeverActionS.getRotationFromAnim(item));
if(item.getItem() == ModItems.gun_bolt_action || item.getItem() == ModItems.gun_bolt_action_green)
if(item.getItem() == ModItems.gun_bolt_action || item.getItem() == ModItems.gun_bolt_action_green || item.getItem() == ModItems.gun_bolt_action_saturnite)
boltaction.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunBoltAction.getLevRotationFromAnim(item), GunBoltAction.getTransFromAnim(item));
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));
@ -147,6 +149,8 @@ public class ItemRenderGunAnim implements IItemRenderer {
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)
@ -170,7 +174,7 @@ public class ItemRenderGunAnim implements IItemRenderer {
leveraction.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunLeverAction.getRotationFromAnim(item));
if(item.getItem() == ModItems.gun_lever_action_sonata)
leveraction.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunLeverActionS.getRotationFromAnim(item));
if(item.getItem() == ModItems.gun_bolt_action || item.getItem() == ModItems.gun_bolt_action_green)
if(item.getItem() == ModItems.gun_bolt_action || item.getItem() == ModItems.gun_bolt_action_green || item.getItem() == ModItems.gun_bolt_action_saturnite)
boltaction.renderAnim((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, GunBoltAction.getLevRotationFromAnim(item), GunBoltAction.getTransFromAnim(item));
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));

View File

@ -6,6 +6,7 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.main.ResourceManager;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
@ -18,12 +19,13 @@ public class RenderLandmine extends TileEntitySpecialRenderer {
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glRotatef(180, 0F, 1F, 0F);
Block block = tileEntity.getWorldObj().getBlock(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
if(block == ModBlocks.mine_ap) {
GL11.glScaled(1.5F, 1.5F, 1.5F);
GL11.glScaled(1.5D, 1.5D, 1.5D);
bindTexture(ResourceManager.mine_ap_tex);
ResourceManager.mine_ap.renderAll();
}
@ -35,6 +37,11 @@ public class RenderLandmine extends TileEntitySpecialRenderer {
bindTexture(ResourceManager.mine_shrap_tex);
ResourceManager.mine_he.renderAll();
}
if(block == ModBlocks.mine_fat) {
GL11.glScaled(0.25D, 0.25D, 0.25D);
bindTexture(ResourceManager.mine_fat_tex);
ResourceManager.mine_fat.renderAll();
}
GL11.glPopMatrix();
}

View File

@ -34,6 +34,9 @@ public class TileEntityLandmine extends TileEntity {
if (block == ModBlocks.mine_shrap) {
range = 1.5D;
}
if (block == ModBlocks.mine_fat) {
range = 2.5D;
}
List<Object> list = worldObj.getEntitiesWithinAABBExcludingEntity(null,
AxisAlignedBB.getBoundingBox(xCoord - range, yCoord - 1, zCoord - range, xCoord + range, yCoord + 1, zCoord + range));