Merge branch 'HbmMods:master' into Optimization

This commit is contained in:
BallOfEnergy 2024-09-12 13:06:30 -05:00 committed by GitHub
commit bad3d3f031
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
82 changed files with 285 additions and 2944 deletions

View File

@ -1,21 +1,6 @@
## Changed
* Changed the multi fluid ID recipe, they now use analog circuits instead of silicon based ones, no longer requiring plastic to make
* Decreased the connection speed for all battery blocks, a full discharge now takes 30 seconds instead of 1 second, and charging now takes 10 seconds
* Capacitors have also been nerfed but they are twice as fast as battery blocks, 5 seconds for charging and 15 seconds for discharging
* Removed forgotten bricks
* Updated CMB brick texture
* The ICF machine block now renders with its 3d model in the creative inventory
* "Toggle backpack" keybind is now called "toggle jetpack" to reduce confusion
* The xenium resonator can now teleport players using the radar linker
* Inserters now have a toggleable destroyer mode which will delete items that cannot be inserted or cached instead of spilling them
* Most loot piles now have configurable loot pools
## Fixed
* Fixed pumpjack gauges not syncing properly
* Fixed some concrete variants not being revertable into uncolored concrete
* Fixed the ore density scanner not using proper translations for the HUD
* Fixed the solar boiler's rays rendering on fast graphics instead of on fancy graphics
* Fixed hydroreactive items not exploding when submerged in water
* Fixed fluid valves visually disconnecting when switching state
* Fixed fluid valves no visually connecting when type is set
* Fixed falling blocks spawned by nukes or impulse grenades dropping blocks that don't have drops
* Added even more exception handling to CompStacks, hopefully fixing an incompatibility with Mana Metal
* Fixed some things not using variable max charge for armor mods, like static pads and DNT nanosuit tooltips
* Fixed arc furnace recipe config parser breaking when reading fluid recipes

View File

@ -8,6 +8,7 @@ import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
@ -25,8 +26,10 @@ public class CommandSatellites extends CommandBase {
@Override
public String getCommandUsage(ICommandSender iCommandSender) {
return String.format(Locale.US,
"%s/%s orbit %s- Launch the held satellite\n" +
"%s/%s descend <frequency> %s- Deletes satellite by frequency.",
"%s/%s orbit %s- Launch the held satellite.\n" +
"%s/%s descend <frequency> %s- Deletes satellite by frequency.\n"+
"%s/%s list %s- Lists all active satellites.",
EnumChatFormatting.GREEN, getCommandName(), EnumChatFormatting.LIGHT_PURPLE,
EnumChatFormatting.GREEN, getCommandName(), EnumChatFormatting.LIGHT_PURPLE,
EnumChatFormatting.GREEN, getCommandName(), EnumChatFormatting.LIGHT_PURPLE
);
@ -65,6 +68,22 @@ public class CommandSatellites extends CommandBase {
sender.addChatMessage(new ChatComponentTranslation( "commands.satellite.no_satellite").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
}
break;
case "list":
data = SatelliteSavedData.getData(sender.getEntityWorld());
if (data.sats.isEmpty()) {
ChatComponentTranslation message = new ChatComponentTranslation("commands.satellite.no_active_satellites");
message.getChatStyle().setColor(EnumChatFormatting.RED);
sender.addChatMessage(message);
} else {
data.sats.forEach((listFreq, sat) -> {
String messageText = String.valueOf(listFreq) + " - " + sat.getClass().getSimpleName();
ChatComponentText message = new ChatComponentText(messageText);
message.getChatStyle().setColor(EnumChatFormatting.GREEN);
sender.addChatMessage(message);
});
}
break;
}
}
@ -78,7 +97,7 @@ public class CommandSatellites extends CommandBase {
return Collections.emptyList();
}
if(args.length == 1) {
return getListOfStringsMatchingLastWord(args, "orbit", "descend");
return getListOfStringsMatchingLastWord(args, "orbit", "descend","list");
}
if (args[0].equals("descend")) {
return getListOfStringsFromIterableMatchingLastWord(args, SatelliteSavedData.getData(sender.getEntityWorld()).sats.keySet().stream().map(String::valueOf).collect(Collectors.toList()));

View File

@ -49,6 +49,7 @@ public class GeneralConfig {
public static boolean enable528BedrockSpawn = false;
public static boolean enable528BosniaSimulator = true;
public static boolean enable528BedrockReplacement = true;
public static boolean enable528NetherBurn = true;
public static int coltanRate = 2;
public static int bedrockRate = 50;
@ -127,6 +128,7 @@ public class GeneralConfig {
enable528BedrockSpawn = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableBedrockSpawning", "Enables the bedrock coltan ores as a rare spawn. These will be rarely found anywhere in the world.", false);
enable528BosniaSimulator = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableBosniaSimulator", "Enables anti tank mines spawning all over the world.", true);
enable528BedrockReplacement = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enable528BedrockReplacement", "Replaces certain bedrock ores with ones that require additional processing.", true);
enable528NetherBurn = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enable528NetherBurn", "Whether players burn in the nether", true);
coltanRate = CommonConfig.createConfigInt(config, CATEGORY_528, "X528_oreColtanFrequency", "Determines how many coltan ore veins are to be expected in a chunk. These values do not affect the frequency in deposits, and only apply if random coltan spanwing is enabled.", 2);
bedrockRate = CommonConfig.createConfigInt(config, CATEGORY_528, "X528_bedrockColtanFrequency", "Determines how often (1 in X) bedrock coltan ores spawn. Applies for both the bedrock ores in the coltan deposit (if applicable) and the random bedrock ores (if applicable)", 50);

View File

@ -99,8 +99,8 @@ public class EntityEffectHandler {
ExplosionNukeSmall.explode(entity.worldObj, entity.posX, entity.posY, entity.posZ, ExplosionNukeSmall.PARAMS_MEDIUM);
}
}
if(GeneralConfig.enable528 && entity instanceof EntityLivingBase && !entity.isImmuneToFire() && entity.worldObj.provider.isHellWorld) {
//only sets players on fire so mod compatibility doesnt die
if((GeneralConfig.enable528 && GeneralConfig.enable528NetherBurn) && entity instanceof EntityPlayer && !entity.isImmuneToFire() && entity.worldObj.provider.isHellWorld) {
entity.setFire(5);
}

View File

@ -233,7 +233,7 @@ public class ArcFurnaceRecipes extends SerializableRecipe {
List<MaterialStack> mats = new ArrayList();
for(JsonElement fluid : fluids) {
JsonArray matStack = fluid.getAsJsonArray();
MaterialStack stack = new MaterialStack(Mats.matById.get(matStack.get(0).getAsInt()), matStack.get(1).getAsInt());
MaterialStack stack = new MaterialStack(Mats.matByName.get(matStack.get(0).getAsString()), matStack.get(1).getAsInt());
if(stack.material.smeltable == SmeltingBehavior.SMELTABLE) {
mats.add(stack);
}

View File

@ -65,6 +65,10 @@ public class ItemPool {
return pool.pool;
}
public static ItemStack getStack(String pool, Random rand) {
return getStack(ItemPool.getPool(pool), rand);
}
public static ItemStack getStack(WeightedRandomChestContent[] pool, Random rand) {
WeightedRandomChestContent weighted = (WeightedRandomChestContent) WeightedRandom.getRandomItem(rand, pool);
ItemStack stack = weighted.theItemId.copy();

View File

@ -2,6 +2,7 @@ package com.hbm.itempool;
import static com.hbm.lib.HbmChestContents.weighted;
import com.hbm.inventory.material.Mats;
import com.hbm.items.ItemAmmoEnums.Ammo357Magnum;
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
import com.hbm.items.ModItems;
@ -14,6 +15,13 @@ public class ItemPoolsPile {
public static final String POOL_PILE_HIVE = "POOL_PILE_HIVE";
public static final String POOL_PILE_BONES = "POOL_PILE_BONES";
public static final String POOL_PILE_CAPS = "POOL_PILE_CAPS";
public static final String POOL_PILE_MED_SYRINGE = "POOL_PILE_MED_SYRINGE";
public static final String POOL_PILE_MED_PILLS = "POOL_PILE_MED_PILLS";
public static final String POOL_PILE_MAKESHIFT_GUN = "POOL_PILE_MAKESHIFT_GUN";
public static final String POOL_PILE_MAKESHIFT_WRENCH = "POOL_PILE_MAKESHIFT_WRENCH";
public static final String POOL_PILE_MAKESHIFT_PLATES = "POOL_PILE_MAKESHIFT_PLATES";
public static final String POOL_PILE_MAKESHIFT_WIRE = "POOL_PILE_MAKESHIFT_WIRE";
public static final String POOL_PILE_NUKE_STORAGE = "POOL_PILE_NUKE_STORAGE";
public static void init() {
@ -69,5 +77,36 @@ public class ItemPoolsPile {
weighted(ModItems.cap_sparkle, 0, 4, 4, 1),
};
}};
//medicine stashes
new ItemPool(POOL_PILE_MED_SYRINGE) {{
this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.syringe_metal_stimpak, 0, 1, 1, 10),
weighted(ModItems.syringe_metal_medx, 0, 1, 1, 5),
weighted(ModItems.syringe_metal_psycho, 0, 1, 1, 5),
};
}};
new ItemPool(POOL_PILE_MED_PILLS) {{
this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.radaway, 0, 1, 1, 10),
weighted(ModItems.radx, 0, 1, 1, 10),
weighted(ModItems.iv_blood, 0, 1, 1, 15),
weighted(ModItems.siox, 0, 1, 1, 5),
};
}};
//makeshift gun
new ItemPool(POOL_PILE_MAKESHIFT_GUN) {{ this.pool = new WeightedRandomChestContent[] { weighted(ModItems.gun_lever_action, 0, 1, 1, 10) }; }};
new ItemPool(POOL_PILE_MAKESHIFT_WRENCH) {{ this.pool = new WeightedRandomChestContent[] { weighted(ModItems.wrench, 0, 1, 1, 10) }; }};
new ItemPool(POOL_PILE_MAKESHIFT_PLATES) {{ this.pool = new WeightedRandomChestContent[] { weighted(ModItems.plate_combine_steel, 0, 1, 1, 10) }; }};
new ItemPool(POOL_PILE_MAKESHIFT_WIRE) {{ this.pool = new WeightedRandomChestContent[] { weighted(ModItems.wire_fine, Mats.MAT_ALUMINIUM.id, 1, 1, 10) }; }};
new ItemPool(POOL_PILE_NUKE_STORAGE) {{
this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.ammo_nuke, AmmoFatman.STOCK.ordinal(), 1, 1, 10),
weighted(ModItems.ammo_nuke, AmmoFatman.LOW.ordinal(), 1, 1, 50),
weighted(ModItems.ammo_nuke, AmmoFatman.SAFE.ordinal(), 1, 1, 50),
};
}};
}
}

View File

@ -1,9 +1,10 @@
package com.hbm.items;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public interface IEquipReceiver {
public void onEquip(EntityPlayer player);
public void onEquip(EntityPlayer player, ItemStack stack);
}

View File

@ -36,7 +36,7 @@ import com.hbm.items.weapon.ItemCustomMissilePart.*;
import com.hbm.items.weapon.ItemMissile.MissileFormFactor;
import com.hbm.items.weapon.ItemMissile.MissileFuel;
import com.hbm.items.weapon.ItemMissile.MissileTier;
import com.hbm.items.weapon.sedna.GunFactory;
import com.hbm.items.weapon.sedna.factory.GunFactory;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.potion.HbmPotion;
@ -1599,10 +1599,6 @@ public class ModItems {
public static Item gun_hp_ammo;
public static Item gun_euthanasia;
public static Item gun_euthanasia_ammo;
public static Item gun_dash;
public static Item gun_dash_ammo;
public static Item gun_twigun;
public static Item gun_twigun_ammo;
public static Item gun_defabricator;
public static Item gun_defabricator_ammo;
public static Item gun_vortex;
@ -4152,10 +4148,6 @@ public class ModItems {
gun_hp = new GunHP().setUnlocalizedName("gun_hp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hp");
gun_euthanasia_ammo = new Item().setUnlocalizedName("gun_euthanasia_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_euthanasia_ammo");
gun_euthanasia = new GunEuthanasia().setUnlocalizedName("gun_euthanasia").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_euthanasia");
gun_dash_ammo = new Item().setUnlocalizedName("gun_dash_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_dash_ammo");
gun_dash = new GunDash().setUnlocalizedName("gun_dash").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_dash");
gun_twigun_ammo = new Item().setUnlocalizedName("gun_twigun_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_twigun_ammo");
gun_twigun = new GunEuthanasia().setUnlocalizedName("gun_twigun").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_twigun");
gun_defabricator_ammo = new Item().setUnlocalizedName("gun_defabricator_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_defabricator_ammo");
gun_defabricator = new GunDefabricator().setUnlocalizedName("gun_defabricator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_defabricator");
gun_vortex = new ItemGunBase(Gun556mmFactory.getEuphieConfig()).setUnlocalizedName("gun_vortex").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_vortex");

View File

@ -173,7 +173,7 @@ public class ArmorDNT extends ArmorFSBPowered {
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
list.add("Charge: " + BobMathUtil.getShortNumber(getCharge(stack)) + " / " + BobMathUtil.getShortNumber(maxPower));
list.add("Charge: " + BobMathUtil.getShortNumber(getCharge(stack)) + " / " + BobMathUtil.getShortNumber(this.getMaxCharge(stack)));
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("armor.fullSetBonus"));

View File

@ -74,7 +74,7 @@ public class ItemModPads extends ItemArmorMod {
if(charge == 0)
charge = powered.consumption / 40;
long power = Math.min(powered.maxPower, powered.getCharge(stack) + charge);
long power = Math.min(powered.getMaxCharge(stack), powered.getCharge(stack) + charge);
powered.setCharge(stack, power);
}
}

View File

@ -1,103 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityLaser;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunDash extends Item {
Random rand = new Random();
public GunDash()
{
this.maxStackSize = 1;
}
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
return EnumAction.bow;
}
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
new ArrowNockEvent(p_77659_3_, p_77659_1_);
{
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
}
return p_77659_1_;
}
@Override
public void onUsingTick(ItemStack stack, EntityPlayer player, int count)
{
World world = player.worldObj;
boolean flag = player.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_dash_ammo))
&& count % 2 == 0) {
EntityLaser laser = new EntityLaser(world, player);
MovingObjectPosition pos = Library.rayTrace(player, 200, 1.0F);
laser.posX = pos.blockX + 0.5;
laser.posY = pos.blockY + 0.5;
laser.posZ = pos.blockZ + 0.5;
world.playSoundAtEntity(player, "hbm:weapon.rifleShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F));
if (!flag) {
player.inventory.consumeInventoryItem(ModItems.gun_dash_ammo);
}
if (!world.isRemote) {
world.spawnEntityInWorld(laser);
}
}
}
@Override
public int getItemEnchantability() {
return 0;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("Ratatatatatatatata!!");
list.add("");
list.add("Ammo: SMG Round");
list.add("Damage: 2 - 8");
list.add("");
list.add("[LEGENDARY WEAPON]");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 3, 0));
return multimap;
}
}

View File

@ -1,144 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityRocket;
import com.hbm.items.ModItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunRpg extends Item {
public static final String[] bowPullIconNameArray = new String[] { "pulling_0", "pulling_1", "pulling_2" };
@SideOnly(Side.CLIENT)
private IIcon[] iconArray;
public GunRpg() {
this.maxStackSize = 1;
this.setMaxDamage(500);
}
/**
* called when the player releases the use item button. Args: itemstack,
* world, entityplayer, itemInUseCount
*/
@Override
public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) {
int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_;
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
MinecraftForge.EVENT_BUS.post(event);
j = event.charge;
boolean flag = p_77615_3_.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0;
if (flag || p_77615_3_.inventory.hasItem(ModItems.ammo_rocket)) {
float f = j / 20.0F;
f = (f * f + f * 2.0F) / 3.0F;
if (j < 25.0D) {
return;
}
if (j > 25.0F) {
f = 25.0F;
}
EntityRocket entityarrow = new EntityRocket(p_77615_2_, p_77615_3_, 3.0F);
if (f == 1.0F) {
entityarrow.setIsCritical(true);
}
p_77615_1_.damageItem(1, p_77615_3_);
p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.rpgShoot", 1.0F, 0.25F);
if (flag) {
entityarrow.canBePickedUp = 2;
} else {
p_77615_3_.inventory.consumeInventoryItem(ModItems.ammo_rocket);
}
if (!p_77615_2_.isRemote) {
entityarrow.canBePickedUp = 2;
p_77615_2_.spawnEntityInWorld(entityarrow);
}
}
}
@Override
public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) {
return p_77654_1_;
}
/**
* How long it takes to use or consume an item
*/
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
/**
* returns the action that specifies what animation to play when the items
* is being used
*/
@Override
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
return EnumAction.bow;
}
/**
* Called whenever this item is equipped and the right mouse button is
* pressed. Args: itemStack, world, entityPlayer
*/
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
MinecraftForge.EVENT_BUS.post(event);
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
return p_77659_1_;
}
/**
* Return the enchantability factor of the item, most of the time is based
* on material.
*/
@Override
public int getItemEnchantability() {
return 1;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("Kaboom!");
list.add("");
list.add("Ammo: Rockets");
list.add("Projectiles explode on impact.");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 4, 0));
return multimap;
}
}

View File

@ -1,135 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.interfaces.IHoldableWeapon;
import com.hbm.items.ModItems;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunUZI extends Item implements IHoldableWeapon {
Random rand = new Random();
public GunUZI()
{
this.maxStackSize = 1;
}
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
return EnumAction.none;
}
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
new ArrowNockEvent(p_77659_3_, p_77659_1_);
{
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
}
return p_77659_1_;
}
@Override
public void onUsingTick(ItemStack stack, EntityPlayer player, int count)
{
World world = player.worldObj;
boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if (player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.ammo_22lr)) {
EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 2, 4, false, false);
entityarrow.setDamage(2 + rand.nextInt(3));
if(this == ModItems.gun_uzi_saturnite || this == ModItems.gun_uzi_saturnite_silencer) {
entityarrow.setDamage(4 + rand.nextInt(5));
entityarrow.fire = true;
}
if(this == ModItems.gun_uzi || this == ModItems.gun_uzi_saturnite)
world.playSoundAtEntity(player, "hbm:weapon.uziShoot", 10.0F, 1.0F);
if(this == ModItems.gun_uzi_silencer || this == ModItems.gun_uzi_saturnite_silencer)
world.playSoundAtEntity(player, "hbm:weapon.silencerShoot", 0.15F, 1.0F);
if (!flag) {
player.inventory.consumeInventoryItem(ModItems.ammo_22lr);
}
if (!world.isRemote) {
world.spawnEntityInWorld(entityarrow);
}
}
}
@Override
public int getItemEnchantability() {
return 0;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
if(this == ModItems.gun_uzi)
list.add("[very intense pewpew-ing]");
if(this == ModItems.gun_uzi_silencer)
list.add("Mom, where are my mittens?");
if(this == ModItems.gun_uzi_saturnite)
list.add("The real deal.");
if(this == ModItems.gun_uzi_saturnite_silencer)
list.add("The real deal 2: Electric boogaloo");
list.add("");
list.add("Ammo: .22 LR Round");
if(this == ModItems.gun_uzi || this == ModItems.gun_uzi_silencer) {
list.add("Damage: 2 - 4");
}
if(this == ModItems.gun_uzi_saturnite || this == ModItems.gun_uzi_saturnite_silencer) {
list.add("Damage: 4 - 8");
list.add("Sets enemy on fire.");
}
}
@Override
public EnumRarity getRarity(ItemStack p_77613_1_) {
if (this == ModItems.gun_uzi_saturnite || this == ModItems.gun_uzi_saturnite_silencer) {
return EnumRarity.rare;
}
return EnumRarity.common;
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 2.5D, 0));
return multimap;
}
@Override
public Crosshair getCrosshair() {
return Crosshair.L_CROSS;
}
}

View File

@ -1,180 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunXVL1456 extends Item {
Random rand = new Random();
public GunXVL1456()
{
this.maxStackSize = 1;
this.setMaxDamage(2500);
}
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
return EnumAction.bow;
}
@Override
public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int i) {
int j = this.getMaxItemUseDuration(stack) - i;
ArrowLooseEvent event = new ArrowLooseEvent(player, stack, j);
MinecraftForge.EVENT_BUS.post(event);
// if (event.isCanceled()) {
// return;
// }
j = event.charge * 2;
if (player.isSneaking() && j >= 20) {
boolean flag = player.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if (flag || player.inventory.hasItem(ModItems.gun_xvl1456_ammo)) {
EntityBullet entitybullet = new EntityBullet(world, player, 3.0F, j, j + 5, false, "tauDay");
entitybullet.setDamage(j + rand.nextInt(6));
world.playSoundAtEntity(player, "hbm:weapon.tauShoot", 1.0F, 0.5F);
if (flag) {
entitybullet.canBePickedUp = 2;
} else {
player.inventory.consumeInventoryItem(ModItems.gun_xvl1456_ammo);
}
entitybullet.setIsCritical(true);
if (!world.isRemote) {
world.spawnEntityInWorld(entitybullet);
}
stack.damageItem((int)(j * 0.05F), player);
player.rotationPitch -= (j * 0.1F);
}
}
}
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
@Override
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
MinecraftForge.EVENT_BUS.post(event);
// if (event.isCanceled()) {
// return event.result;
// }
// Made uncancelable to prevent intermod idiocy
{
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
}
return p_77659_1_;
}
@Override
public void onUsingTick(ItemStack stack, EntityPlayer player, int count)
{
World world = player.worldObj;
if (!player.isSneaking()) {
boolean flag = player.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_xvl1456_ammo)) && count % 4 == 0) {
EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 25, 65, false, "eyyOk");
entityarrow.setDamage(25 + rand.nextInt(65 - 25));
world.playSoundAtEntity(player, "hbm:weapon.tauShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F));
if (flag) {
entityarrow.canBePickedUp = 2;
} else {
player.inventory.consumeInventoryItem(ModItems.gun_xvl1456_ammo);
}
if (!world.isRemote) {
world.spawnEntityInWorld(entityarrow);
}
}
} else {
if (count % 20 == 0 && this.getMaxItemUseDuration(stack) - count != 0) {
boolean flag = player.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_xvl1456_ammo))) {
if (!flag) {
player.inventory.consumeInventoryItem(ModItems.gun_xvl1456_ammo);
}
}
}
world.playSoundAtEntity(player, "hbm:misc.nullTau", 0.1F, 1.0F);
}
if(player instanceof EntityPlayer)
{
if(count < getMaxItemUseDuration(stack) - 200 && player.isSneaking() && count != 0)
{
if(!world.isRemote)
{
stack.damageItem(1250, player);
world.createExplosion(player, player.posX, player.posY, player.posZ, 10.0F, true);
player.attackEntityFrom(ModDamageSource.tauBlast, 1000F);
player.dropOneItem(false);
}
}
}
}
@Override
public int getItemEnchantability() {
return 0;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("Hold right mouse button");
list.add("to shoot tauons,");
list.add("sneak to charge up for");
list.add("stronger shots!");
list.add("");
list.add("Ammo: Depleted Uranium");
list.add("Damage: 25 - 65");
list.add("Charged Damage: 40 - 400");
list.add("Projectiles penetrate walls.");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 6, 0));
return multimap;
}
}

View File

@ -1,226 +0,0 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.entity.projectile.EntityRainbow;
import com.hbm.items.ModItems;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
public class GunZOMG extends Item {
Random rand = new Random();
public GunZOMG() {
this.maxStackSize = 1;
}
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
return EnumAction.bow;
}
@Override
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
return 72000;
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
new ArrowNockEvent(player, stack);
{
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
}
if (!stack.hasTagCompound()) {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setBoolean("valid", false);
stack.stackTagCompound.setBoolean("superuser", false);
}
if (!player.isSneaking()) {
if (stack.stackTagCompound.getBoolean("valid")) {
if ((player.inventory.hasItem(ModItems.nugget_euphemium)
|| player.inventory.hasItem(ModItems.ingot_euphemium))) {
} else {
if (!player.inventory.hasItem(ModItems.nugget_euphemium)
&& !player.inventory.hasItem(ModItems.ingot_euphemium)) {
stack.stackTagCompound.setBoolean("valid", false);
if (!world.isRemote) {
player.addChatMessage(new ChatComponentText("[ZOMG] Validation lost!"));
player.addChatMessage(new ChatComponentText("[ZOMG] Request new validation!"));
}
}
}
} else {
if (!world.isRemote) {
player.addChatMessage(new ChatComponentText("[ZOMG] Gun not validated!"));
player.addChatMessage(new ChatComponentText("[ZOMG] Validate your gun with shift right-click."));
}
}
} else {
if (stack.stackTagCompound.getBoolean("valid")) {
if (!world.isRemote) {
player.addChatMessage(new ChatComponentText("[ZOMG] Gun has already been validated."));
}
} else {
if (player.inventory.hasItem(ModItems.nugget_euphemium) || player.inventory.hasItem(ModItems.ingot_euphemium)) {
stack.stackTagCompound.setBoolean("valid", true);
if (!world.isRemote) {
player.addChatMessage(new ChatComponentText("[ZOMG] Gun has been validated!"));
}
//if(Library.superuser.contains(player.getUniqueID().toString())) {
if(player.inventory.hasItem(ModItems.polaroid)) {
if (!world.isRemote) {
player.addChatMessage(new ChatComponentText("[ZOMG] Welcome, superuser!"));
}
stack.stackTagCompound.setBoolean("superuser", true);
} else {
if (!world.isRemote) {
player.addChatMessage(new ChatComponentText("[ZOMG] Welcome, user!"));
}
stack.stackTagCompound.setBoolean("superuser", false);
}
} else {
if (!world.isRemote) {
player.addChatMessage(new ChatComponentText("[ZOMG] Validation failed!"));
player.addChatMessage(new ChatComponentText("[ZOMG] No external negative gravity well found!"));
}
}
}
}
return stack;
}
@Override
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {
World world = player.worldObj;
if (!stack.hasTagCompound()) {
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setBoolean("valid", false);
stack.stackTagCompound.setBoolean("superuser", false);
}
if (!player.isSneaking()) {
if (stack.stackTagCompound.getBoolean("valid")) {
EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack);
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.nugget_euphemium)
|| player.inventory.hasItem(ModItems.ingot_euphemium)) && count % 1 == 0) {
if (!stack.stackTagCompound.getBoolean("superuser")) {
EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 35, 45, false, "chopper");
EntityBullet entityarrow1 = new EntityBullet(world, player, 3.0F, 35, 45, false, "chopper");
EntityBullet entityarrow2 = new EntityBullet(world, player, 3.0F, 35, 45, false, "chopper");
EntityBullet entityarrow3 = new EntityBullet(world, player, 3.0F, 35, 45, false, "chopper");
EntityBullet entityarrow4 = new EntityBullet(world, player, 3.0F, 35, 45, false, "chopper");
EntityBullet entityarrow5 = new EntityBullet(world, player, 3.0F, 35, 45, false, "chopper");
entityarrow.setDamage(35 + rand.nextInt(45 - 35));
entityarrow1.setDamage(35 + rand.nextInt(45 - 35));
entityarrow2.setDamage(35 + rand.nextInt(45 - 35));
entityarrow3.setDamage(35 + rand.nextInt(45 - 35));
entityarrow4.setDamage(35 + rand.nextInt(45 - 35));
entityarrow5.setDamage(35 + rand.nextInt(45 - 35));
world.playSoundAtEntity(player, "hbm:weapon.osiprShoot", 1.0F, 0.6F + (rand.nextFloat() * 0.4F));
if (!world.isRemote) {
world.spawnEntityInWorld(entityarrow);
world.spawnEntityInWorld(entityarrow1);
world.spawnEntityInWorld(entityarrow2);
world.spawnEntityInWorld(entityarrow3);
world.spawnEntityInWorld(entityarrow4);
world.spawnEntityInWorld(entityarrow5);
}
} else {
EntityRainbow entityarrow = new EntityRainbow(world, player, 1F);
EntityRainbow entityarrow1 = new EntityRainbow(world, player, 1F);
EntityRainbow entityarrow2 = new EntityRainbow(world, player, 1F);
EntityRainbow entityarrow3 = new EntityRainbow(world, player, 1F);
EntityRainbow entityarrow4 = new EntityRainbow(world, player, 1F);
entityarrow.setDamage(10000 + rand.nextInt(90000));
entityarrow1.setDamage(10000 + rand.nextInt(90000));
entityarrow2.setDamage(10000 + rand.nextInt(90000));
entityarrow3.setDamage(10000 + rand.nextInt(90000));
entityarrow4.setDamage(10000 + rand.nextInt(90000));
//world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4));
world.playSoundAtEntity(player, "hbm:weapon.zomgShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F));
if (!world.isRemote) {
world.spawnEntityInWorld(entityarrow);
world.spawnEntityInWorld(entityarrow1);
world.spawnEntityInWorld(entityarrow2);
world.spawnEntityInWorld(entityarrow3);
world.spawnEntityInWorld(entityarrow4);
}
}
} else {
if (!player.inventory.hasItem(ModItems.nugget_euphemium)
&& !player.inventory.hasItem(ModItems.ingot_euphemium)) {
stack.stackTagCompound.setBoolean("valid", false);
if (!world.isRemote) {
player.addChatMessage(new ChatComponentText("[ZOMG] Validation lost!"));
player.addChatMessage(new ChatComponentText("[ZOMG] Request new validation!"));
}
}
}
}
}
}
@Override
public int getItemEnchantability() {
return 0;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
if(itemstack.getTagCompound() == null)
{
list.add("Gun not validated.");
} else if(itemstack.getTagCompound().getBoolean("valid")) {
if(itemstack.getTagCompound().getBoolean("superuser")) {
list.add("Gun set to superuser mode.");
list.add("Firing mode: Negative energy bursts");
} else {
list.add("Gun set to regular user mode.");
list.add("Firing mode: Dark pulse spray");
}
} else {
list.add("Gun not validated.");
}
list.add("");
list.add("Ammo: None (Requires Validation)");
list.add("Damage: 35 - 45");
list.add("Energy Damage: 10000 - 100000");
list.add("Energy projectiles destroy blocks.");
list.add("");
list.add("[LEGENDARY WEAPON]");
//for(int i = 0; i < 25; i++)
// list.add("How do I use the ZOMG? How do I use the ZOMG? How do I use the ZOMG?");
}
@Override
public Multimap getItemAttributeModifiers() {
Multimap multimap = super.getItemAttributeModifiers();
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "Weapon modifier", 6, 0));
return multimap;
}
}

View File

@ -34,7 +34,7 @@ public class ItemCrucible extends ItemSwordAbility implements IEquipReceiver {
}
@Override
public void onEquip(EntityPlayer player) {
public void onEquip(EntityPlayer player, ItemStack stack) {
if(!(player instanceof EntityPlayerMP))
return;

View File

@ -801,7 +801,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
}
@Override
public void onEquip(EntityPlayer player) {
public void onEquip(EntityPlayer player, ItemStack stack) {
if(!mainConfig.equipSound.isEmpty() && !player.worldObj.isRemote) {
player.worldObj.playSoundAtEntity(player, mainConfig.equipSound, 1, 1);
}

View File

@ -1,8 +1,11 @@
package com.hbm.items.weapon.sedna;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import com.hbm.items.weapon.sedna.ItemGunBase.LambdaContext;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.item.ItemStack;
@ -16,6 +19,7 @@ public class GunConfig {
protected float durability;
protected int drawDuration = 0;
protected Crosshair crosshair;
protected boolean reloadAnimationsSequential;
/** Lambda functions for clicking shit */
protected BiConsumer<ItemStack, LambdaContext> onPressPrimary;
protected BiConsumer<ItemStack, LambdaContext> onPressSecondary;
@ -28,13 +32,16 @@ public class GunConfig {
protected BiConsumer<ItemStack, LambdaContext> onReleaseReload;
/** The engine for the state machine that determines the gun's overall behavior */
protected BiConsumer<ItemStack, LambdaContext> decider;
/** Lambda that returns the relevant animation for the given params */
protected BiFunction<ItemStack, AnimType, BusAnimation> animations;
/* GETTERS */
public Receiver[] getReceivers(ItemStack stack) { return receivers; }
public float getDurability(ItemStack stack) { return durability; }
public int getDrawDuration(ItemStack stack) { return drawDuration; }
public Crosshair getCrosshair(ItemStack stack) { return crosshair; }
public Receiver[] getReceivers(ItemStack stack) { return receivers; }
public float getDurability(ItemStack stack) { return durability; }
public int getDrawDuration(ItemStack stack) { return drawDuration; }
public Crosshair getCrosshair(ItemStack stack) { return crosshair; }
public boolean getReloadAnimSequential(ItemStack stack) { return reloadAnimationsSequential; }
public BiConsumer<ItemStack, LambdaContext> getPressPrimary(ItemStack stack) { return this.onPressPrimary; }
public BiConsumer<ItemStack, LambdaContext> getPressSecondary(ItemStack stack) { return this.onPressSecondary; }
@ -48,6 +55,8 @@ public class GunConfig {
public BiConsumer<ItemStack, LambdaContext> getDecider(ItemStack stack) { return this.decider; }
public BiFunction<ItemStack, AnimType, BusAnimation> getAnims(ItemStack stack) { return this.animations; }
/* SETTERS */
public GunConfig rec(Receiver... receivers) { this.receivers = receivers; return this; }
@ -69,4 +78,7 @@ public class GunConfig {
//decider
public GunConfig decider(BiConsumer<ItemStack, LambdaContext> lambda) { this.decider = lambda; return this; }
//anims
public GunConfig anim(BiFunction<ItemStack, AnimType, BusAnimation> lambda) { this.animations = lambda; return this; }
}

View File

@ -1,19 +1,29 @@
package com.hbm.items.weapon.sedna;
import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.interfaces.IItemHUD;
import com.hbm.items.IEquipReceiver;
import com.hbm.items.IKeybindReceiver;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.GunAnimationPacket;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay;
import com.hbm.util.EnumUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
public class ItemGunBase extends Item implements IKeybindReceiver {
public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipReceiver, IItemHUD {
public static final String KEY_DRAWN = "drawn";
public static final String KEY_AIMING = "aiming";
@ -34,7 +44,7 @@ public class ItemGunBase extends Item implements IKeybindReceiver {
return config_DNA;
}
public ItemGunBase(GunConfig cfg) {
public ItemGunBaseNT(GunConfig cfg) {
this.setMaxStackSize(1);
this.config_DNA = cfg;
}
@ -68,6 +78,11 @@ public class ItemGunBase extends Item implements IKeybindReceiver {
if(keybind == EnumKeybind.RELOAD && !newState && getReloadKey(stack)) { if(config.getReleaseReload(stack) != null) config.getReleaseReload(stack).accept(stack, ctx); this.setReloadKey(stack, newState); return; }
}
@Override
public void onEquip(EntityPlayer player, ItemStack stack) {
if(player instanceof EntityPlayerMP) PacketDispatcher.wrapper.sendTo(new GunAnimationPacket(AnimType.EQUIP.ordinal()), (EntityPlayerMP) player);
}
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isHeld) {
@ -152,4 +167,14 @@ public class ItemGunBase extends Item implements IKeybindReceiver {
this.player = player;
}
}
@Override
public void renderHUD(Pre event, ElementType type, EntityPlayer player, ItemStack stack) {
if(type == ElementType.CROSSHAIRS) {
event.setCanceled(true);
if(aimingProgress >= 1F) return;
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, gun.getConfig(stack).getCrosshair(stack));
}
}
}

View File

@ -4,7 +4,7 @@ import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import com.hbm.handler.CasingEjector;
import com.hbm.items.weapon.sedna.ItemGunBase.LambdaContext;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.items.weapon.sedna.mags.IMagazine;
import net.minecraft.item.ItemStack;

View File

@ -1,8 +1,10 @@
package com.hbm.items.weapon.sedna;
package com.hbm.items.weapon.sedna.factory;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.sedna.factory.GunStateDecider;
import com.hbm.items.weapon.sedna.factory.Lego;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.mags.MagazineRevolverDrum;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
@ -18,7 +20,7 @@ public class GunFactory {
BulletConfig ammo_debug = new BulletConfig().setItem(ModItems.ammo_debug);
ModItems.gun_debug = new ItemGunBase(new GunConfig()
ModItems.gun_debug = new ItemGunBaseNT(new GunConfig()
.dura(600).draw(15).crosshair(Crosshair.L_CLASSIC)
.rec(new Receiver()
.dmg(10F).delay(10).mag(new MagazineRevolverDrum(0, 6).addConfigs(ammo_debug))
@ -27,6 +29,7 @@ public class GunFactory {
.pp(Lego.LAMBDA_STANDARD_FIRE)
.pt(Lego.LAMBDA_TOGGLE_AIM)
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
.anim(Lego.LAMBDA_DEBUG_ANIMS)
).setUnlocalizedName("gun_debug").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_darter");
}
}

View File

@ -4,10 +4,10 @@ import java.util.function.BiConsumer;
import java.util.function.BooleanSupplier;
import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.ItemGunBase;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.ItemGunBase.GunState;
import com.hbm.items.weapon.sedna.ItemGunBase.LambdaContext;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@ -20,10 +20,10 @@ public class GunStateDecider {
* It supports draw delays as well as semi and auto fire
*/
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_DECIDER = (stack, ctx) -> {
GunState lastState = ItemGunBase.getState(stack);
GunState lastState = ItemGunBaseNT.getState(stack);
deciderStandardFinishDraw(stack, lastState);
deciderStandardReload(stack, ctx, lastState, 0);
deciderAutoRefire(stack, ctx, lastState, 0, () -> { return ItemGunBase.getPrimary(stack); });
deciderAutoRefire(stack, ctx, lastState, 0, () -> { return ItemGunBaseNT.getPrimary(stack); });
};
/** Transitions the gun from DRAWING to IDLE */
@ -31,8 +31,8 @@ public class GunStateDecider {
//transition to idle
if(lastState == GunState.DRAWING) {
ItemGunBase.setState(stack, GunState.IDLE);
ItemGunBase.setTimer(stack, 0);
ItemGunBaseNT.setState(stack, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, 0);
}
}
@ -49,12 +49,12 @@ public class GunStateDecider {
//if after reloading the gun can still reload, assume a tube mag and resume reloading
if(cfg.getReceivers(stack)[recIndex].getMagazine(stack).canReload(stack, player)) {
ItemGunBase.setState(stack, GunState.RELOADING);
ItemGunBase.setTimer(stack, cfg.getReceivers(stack)[recIndex].getReloadDuration(stack));
ItemGunBaseNT.setState(stack, GunState.RELOADING);
ItemGunBaseNT.setTimer(stack, cfg.getReceivers(stack)[recIndex].getReloadDuration(stack));
//if no more reloading can be done, go idle
} else {
ItemGunBase.setState(stack, GunState.IDLE);
ItemGunBase.setTimer(stack, 0);
ItemGunBaseNT.setState(stack, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, 0);
}
}
}
@ -72,17 +72,17 @@ public class GunStateDecider {
//if there's a bullet loaded, fire again
if(rec.getCanFire(stack).apply(stack, ctx)) {
rec.getOnFire(stack).accept(stack, ctx);
ItemGunBase.setState(stack, GunState.JUST_FIRED);
ItemGunBase.setTimer(stack, rec.getDelayAfterFire(stack));
ItemGunBaseNT.setState(stack, GunState.JUST_FIRED);
ItemGunBaseNT.setTimer(stack, rec.getDelayAfterFire(stack));
//if not, revert to idle
} else {
ItemGunBase.setState(stack, GunState.IDLE);
ItemGunBase.setTimer(stack, 0);
ItemGunBaseNT.setState(stack, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, 0);
}
//if not, go idle
} else {
ItemGunBase.setState(stack, GunState.IDLE);
ItemGunBase.setTimer(stack, 0);
ItemGunBaseNT.setState(stack, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, 0);
}
}
}

View File

@ -3,11 +3,17 @@ package com.hbm.items.weapon.sedna.factory;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import com.hbm.items.weapon.sedna.ItemGunBase;
import com.hbm.items.weapon.sedna.ItemGunBase.GunState;
import com.hbm.items.weapon.sedna.ItemGunBase.LambdaContext;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.GunAnimationPacket;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
/**
@ -21,9 +27,9 @@ public class Lego {
* If IDLE and the mag of receiver 0 can be loaded, set state to RELOADING. Used by keybinds. */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_RELOAD = (stack, ctx) -> {
if(ItemGunBase.getState(stack) == GunState.IDLE && ctx.config.getReceivers(stack)[0].getMagazine(stack).canReload(stack, ctx.player)) {
ItemGunBase.setState(stack, GunState.RELOADING);
ItemGunBase.setTimer(stack, ctx.config.getReceivers(stack)[0].getReloadDuration(stack));
if(ItemGunBaseNT.getState(stack) == GunState.IDLE && ctx.config.getReceivers(stack)[0].getMagazine(stack).canReload(stack, ctx.player)) {
ItemGunBaseNT.setState(stack, GunState.RELOADING);
ItemGunBaseNT.setTimer(stack, ctx.config.getReceivers(stack)[0].getReloadDuration(stack));
}
};
@ -31,15 +37,15 @@ public class Lego {
* If IDLE and ammo is loaded, fire and set to JUST_FIRED. */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_FIRE = (stack, ctx) -> {
if(ItemGunBase.getState(stack) == GunState.IDLE && ctx.config.getReceivers(stack)[0].getCanFire(stack).apply(stack, ctx)) {
ItemGunBase.setState(stack, GunState.JUST_FIRED);
ItemGunBase.setTimer(stack, ctx.config.getReceivers(stack)[0].getDelayAfterFire(stack));
if(ItemGunBaseNT.getState(stack) == GunState.IDLE && ctx.config.getReceivers(stack)[0].getCanFire(stack).apply(stack, ctx)) {
ItemGunBaseNT.setState(stack, GunState.JUST_FIRED);
ItemGunBaseNT.setTimer(stack, ctx.config.getReceivers(stack)[0].getDelayAfterFire(stack));
ctx.config.getReceivers(stack)[0].getOnFire(stack).accept(stack, ctx);
}
};
/** Toggles isAiming. Used by keybinds. */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TOGGLE_AIM = (stack, ctx) -> { ItemGunBase.setIsAiming(stack, !ItemGunBase.getIsAiming(stack)); };
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TOGGLE_AIM = (stack, ctx) -> { ItemGunBaseNT.setIsAiming(stack, !ItemGunBaseNT.getIsAiming(stack)); };
/** Returns true if the mag has ammo in it. Used by keybind functions on whether to fire, and deciders on whether to trigger a refire, */
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_STANDARD_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack) > 0; };
@ -53,5 +59,26 @@ public class Lego {
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_DEBUG_FIRE = (stack, ctx) -> {
EntityPlayer player = ctx.player;
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "hbm:weapon.shotgunShoot", 1F, 1F);
if(player instanceof EntityPlayerMP) PacketDispatcher.wrapper.sendTo(new GunAnimationPacket(AnimType.CYCLE.ordinal()), (EntityPlayerMP) player);
};
public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_DEBUG_ANIMS = (stack, type) -> {
switch(type) {
case CYCLE:
return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addKeyframePosition(0, 0, 0, 50).addKeyframePosition(0, 0, -3, 50).addKeyframePosition(0, 0, 0, 250))
.addBus("HAMMER", new BusAnimationSequence().addKeyframePosition(0, 0, 1, 50).addKeyframePosition(0, 0, 1, 300).addKeyframePosition(0, 0, 0, 200))
.addBus("DRUM", new BusAnimationSequence().addKeyframePosition(0, 0, 1, 50));
case CYCLE_EMPTY: break;
case ALT_CYCLE: break;
case EQUIP: return new BusAnimation().addBus("ROTATE", new BusAnimationSequence().addKeyframePosition(-360, 0, 0, 350));
case RELOAD: break;
case RELOAD_CYCLE: break;
case RELOAD_EMPTY: break;
case RELOAD_END: break;
case SPINDOWN: break;
case SPINUP: break;
}
return null;
};
}

View File

@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.ItemGunBase;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import net.minecraft.item.ItemStack;
@ -49,10 +49,10 @@ public abstract class MagazineStandardBase implements IMagazine {
@Override public void setAmount(ItemStack stack, int amount) { setMagCount(stack, index, amount); }
// MAG TYPE //
public static int getMagType(ItemStack stack, int index) { return ItemGunBase.getValueInt(stack, KEY_MAG_TYPE + index); }
public static void setMagType(ItemStack stack, int index, int value) { ItemGunBase.setValueInt(stack, KEY_MAG_TYPE + index, value); }
public static int getMagType(ItemStack stack, int index) { return ItemGunBaseNT.getValueInt(stack, KEY_MAG_TYPE + index); }
public static void setMagType(ItemStack stack, int index, int value) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_TYPE + index, value); }
// MAG COUNT //
public static int getMagCount(ItemStack stack, int index) { return ItemGunBase.getValueInt(stack, KEY_MAG_COUNT + index); }
public static void setMagCount(ItemStack stack, int index, int value) { ItemGunBase.setValueInt(stack, KEY_MAG_COUNT + index, value); }
public static int getMagCount(ItemStack stack, int index) { return ItemGunBaseNT.getValueInt(stack, KEY_MAG_COUNT + index); }
public static void setMagCount(ItemStack stack, int index, int value) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_COUNT + index, value); }
}

View File

@ -552,8 +552,6 @@ public class ClientProxy extends ServerProxy {
MinecraftForgeClient.registerItemRenderer(ModItems.gun_hp, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_euthanasia, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_defabricator, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_dash, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_twigun, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lever_action, new ItemRenderWeaponFFMaresLeg(ResourceManager.ff_gun_bright, ResourceManager.ff_wood));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolt_action, new ItemRenderWeaponFFBolt(ResourceManager.rem700, ResourceManager.rem700_tex));
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lever_action_dark, new ItemRenderWeaponFFMaresLeg(ResourceManager.ff_gun_normal, ResourceManager.ff_wood_red));

View File

@ -478,7 +478,7 @@ public class ModEventHandler {
&& (prevArmor[0] == null || prevArmor[0].getItem() != event.entityLiving.getHeldItem().getItem())
&& event.entityLiving.getHeldItem().getItem() instanceof IEquipReceiver) {
((IEquipReceiver)event.entityLiving.getHeldItem().getItem()).onEquip((EntityPlayer) event.entityLiving);
((IEquipReceiver)event.entityLiving.getHeldItem().getItem()).onEquip((EntityPlayer) event.entityLiving, event.entityLiving.getHeldItem());
}
for(int i = 1; i < 5; i++) {

View File

@ -24,6 +24,7 @@ import com.hbm.handler.ArmorModHandler;
import com.hbm.handler.GunConfiguration;
import com.hbm.handler.HTTPHandler;
import com.hbm.handler.HazmatRegistry;
import com.hbm.handler.HbmKeybinds;
import com.hbm.handler.ImpactWorldHandler;
import com.hbm.hazard.HazardSystem;
import com.hbm.interfaces.IHoldableWeapon;
@ -43,6 +44,7 @@ import com.hbm.items.machine.ItemDepletedFuel;
import com.hbm.items.machine.ItemFluidDuct;
import com.hbm.items.machine.ItemRBMKPellet;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.lib.Library;
import com.hbm.lib.RefStrings;
import com.hbm.packet.PacketDispatcher;
@ -61,7 +63,6 @@ import com.hbm.sound.MovingSoundChopper;
import com.hbm.sound.MovingSoundChopperMine;
import com.hbm.sound.MovingSoundCrashing;
import com.hbm.sound.MovingSoundPlayerLoop;
import com.hbm.sound.MovingSoundXVL1456;
import com.hbm.tileentity.bomb.TileEntityNukeCustom;
import com.hbm.tileentity.bomb.TileEntityNukeCustom.CustomNukeEntry;
import com.hbm.tileentity.bomb.TileEntityNukeCustom.EnumEntryType;
@ -104,6 +105,7 @@ import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.client.settings.GameSettings;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
@ -635,19 +637,6 @@ public class ModEventHandlerClient {
//A winner is you.
//Conglaturations.
//Fuck you.
if(r.toString().equals("hbm:misc.nullTau") && Library.getClosestPlayerForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2) != null)
{
EntityPlayer ent = Library.getClosestPlayerForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2);
if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop) == null) {
MovingSoundPlayerLoop.globalSoundList.add(new MovingSoundXVL1456(new ResourceLocation("hbm:weapon.tauChargeLoop2"), ent, EnumHbmSound.soundTauLoop));
MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).setPitch(0.5F);
} else {
if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).getPitch() < 1.5F)
MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).setPitch(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).getPitch() + 0.01F);
}
}
if(r.toString().equals("hbm:misc.nullChopper") && Library.getClosestChopperForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2) != null)
{
@ -1090,6 +1079,24 @@ public class ModEventHandlerClient {
}
}
}
boolean gunKey = keyCode == HbmKeybinds.gunPrimaryKey.getKeyCode() || keyCode == HbmKeybinds.gunSecondaryKey.getKeyCode() ||
keyCode == HbmKeybinds.gunTertiaryKey.getKeyCode() || keyCode == HbmKeybinds.reloadKey.getKeyCode();
/* Shoot in favor of attacking */
if(gunKey && keyCode == mc.gameSettings.keyBindAttack.getKeyCode()) {
mc.gameSettings.keyBindAttack.pressed = false;
mc.gameSettings.keyBindAttack.pressTime = 0;
}
EntityPlayer player = mc.thePlayer;
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemGunBaseNT) {
if(gunKey && keyCode == mc.gameSettings.keyBindPickBlock.getKeyCode()) {
mc.gameSettings.keyBindPickBlock.pressed = false;
mc.gameSettings.keyBindPickBlock.pressTime = 0;
}
}
}
}

View File

@ -1,6 +1,10 @@
package com.hbm.packet.toclient;
import java.util.function.BiFunction;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.HbmAnimations;
import com.hbm.render.anim.HbmAnimations.AnimType;
@ -51,6 +55,10 @@ public class GunAnimationPacket implements IMessage {
if(stack == null)
return null;
if(stack.getItem() instanceof com.hbm.items.weapon.sedna.ItemGunBaseNT) {
handleSedna(player, stack, slot, AnimType.values()[m.type]);
}
if(!(stack.getItem() instanceof ItemGunBase))
return null;
@ -81,5 +89,27 @@ public class GunAnimationPacket implements IMessage {
return null;
}
public static void handleSedna(EntityPlayer player, ItemStack stack, int slot, AnimType type) {
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
GunConfig config = gun.getConfig(stack);
BiFunction<ItemStack, AnimType, BusAnimation> anims = config.getAnims(stack);
BusAnimation animation = anims.apply(stack, type);
if(animation == null && type == AnimType.RELOAD_EMPTY) {
animation = anims.apply(stack, AnimType.RELOAD);
}
if(animation == null && (type == AnimType.ALT_CYCLE || type == AnimType.CYCLE_EMPTY)) {
animation = anims.apply(stack, AnimType.CYCLE);
}
if(animation != null) {
Minecraft.getMinecraft().entityRenderer.itemRenderer.resetEquippedProgress();
Minecraft.getMinecraft().entityRenderer.itemRenderer.itemToRender = stack;
boolean isReloadAnimation = type == AnimType.RELOAD || type == AnimType.RELOAD_CYCLE || type == AnimType.RELOAD_EMPTY;
HbmAnimations.hotbar[slot] = new Animation(stack.getItem().getUnlocalizedName(), System.currentTimeMillis(), animation, isReloadAnimation && config.getReloadAnimSequential(stack));
}
}
}
}

View File

@ -6,16 +6,13 @@ import com.hbm.items.ModItems;
import com.hbm.items.weapon.GunFolly;
import com.hbm.items.weapon.ItemGunBase;
import com.hbm.lib.RefStrings;
import com.hbm.render.model.ModelDash;
import com.hbm.render.model.ModelDefabricator;
import com.hbm.render.model.ModelEuthanasia;
import com.hbm.render.model.ModelFolly;
import com.hbm.render.model.ModelHP;
import com.hbm.render.model.ModelJack;
import com.hbm.render.model.ModelLacunae;
import com.hbm.render.model.ModelPip;
import com.hbm.render.model.ModelSpark;
import com.hbm.render.model.ModelTwiGun;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
@ -31,9 +28,6 @@ public class ItemRenderOverkill implements IItemRenderer {
protected ModelHP hppLaserjet;
protected ModelEuthanasia euthanasia;
protected ModelDefabricator defab;
protected ModelDash dasher;
protected ModelTwiGun rgottp;
protected ModelPip pip;
protected ModelLacunae lacunae;
protected ModelFolly folly;
@ -43,9 +37,6 @@ public class ItemRenderOverkill implements IItemRenderer {
hppLaserjet = new ModelHP();
euthanasia = new ModelEuthanasia();
defab = new ModelDefabricator();
dasher = new ModelDash();
rgottp = new ModelTwiGun();
pip = new ModelPip();
lacunae = new ModelLacunae();
folly = new ModelFolly();
}
@ -88,10 +79,6 @@ public class ItemRenderOverkill implements IItemRenderer {
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_dash)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelDash.png"));
if(item.getItem() == ModItems.gun_twigun)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelTwiGun.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)
@ -154,16 +141,6 @@ public class ItemRenderOverkill implements IItemRenderer {
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_dash)
dasher.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
if(item.getItem() == ModItems.gun_twigun)
rgottp.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
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)
pip.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
if(item.getItem() == ModItems.gun_lacunae ||
item.getItem() == ModItems.gun_minigun)
@ -190,10 +167,6 @@ public class ItemRenderOverkill implements IItemRenderer {
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_dash)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelDash.png"));
if(item.getItem() == ModItems.gun_twigun)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelTwiGun.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)
@ -256,16 +229,6 @@ public class ItemRenderOverkill implements IItemRenderer {
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_dash)
dasher.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
if(item.getItem() == ModItems.gun_twigun)
rgottp.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
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)
pip.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
if(item.getItem() == ModItems.gun_lacunae ||
item.getItem() == ModItems.gun_minigun)
@ -291,10 +254,6 @@ public class ItemRenderOverkill implements IItemRenderer {
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_dash)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelDash.png"));
if(item.getItem() == ModItems.gun_twigun)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelTwiGun.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)
@ -341,16 +300,6 @@ public class ItemRenderOverkill implements IItemRenderer {
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_dash)
dasher.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
if(item.getItem() == ModItems.gun_twigun)
rgottp.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
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)
pip.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
if(item.getItem() == ModItems.gun_lacunae ||
item.getItem() == ModItems.gun_minigun)

View File

@ -1,86 +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.ModelNightmare;
import com.hbm.render.model.ModelNightmare2;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
public class ItemRenderRevolverNightmare implements IItemRenderer {
protected ModelNightmare n1;
protected ModelNightmare2 n2;
protected Item item;
public ItemRenderRevolverNightmare(Item item) {
n1 = new ModelNightmare();
n2 = new ModelNightmare2();
this.item = item;
}
@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(this.item == ModItems.gun_revolver_nightmare)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelNightmare.png"));
if(this.item == ModItems.gun_revolver_nightmare2)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelNightmare2.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);
if(this.item == ModItems.gun_revolver_nightmare)
n1.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
if(this.item == ModItems.gun_revolver_nightmare2)
n2.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();
if(this.item == ModItems.gun_revolver_nightmare)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelNightmare.png"));
if(this.item == ModItems.gun_revolver_nightmare2)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelNightmare2.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);
if(this.item == ModItems.gun_revolver_nightmare)
n1.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
if(this.item == ModItems.gun_revolver_nightmare2)
n2.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, item);
GL11.glPopMatrix();
default: break;
}
}
}

View File

@ -1,64 +0,0 @@
package com.hbm.render.item.weapon;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.render.model.ModelRocket;
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 ItemRenderRocket implements IItemRenderer {
protected ModelRocket swordModel;
public ItemRenderRocket() {
swordModel = new ModelRocket();
}
@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/ModelRocket.png"));
GL11.glRotatef(-45.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(0.0F, 0.6F, -0.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/ModelRocket.png"));
GL11.glRotatef(-110.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(75.0F, 0.0F, 2.0F, 0.0F);
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, 0.5F, 0.0F);
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;
}
}
}

View File

@ -2,8 +2,9 @@ package com.hbm.render.item.weapon.sedna;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.sedna.ItemGunBase;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
@ -11,7 +12,7 @@ import net.minecraft.item.ItemStack;
public class ItemRenderDebug extends ItemRenderWeaponBase {
@Override
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBase.getIsAiming(stack) ? 2.5F : -0.25F; }
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
@Override
protected void setupFirstPerson(ItemStack stack) {
@ -30,14 +31,34 @@ public class ItemRenderDebug extends ItemRenderWeaponBase {
GL11.glScaled(scale, scale, scale);
GL11.glRotated(90, 0, 1, 0);
double[] equipSpin = HbmAnimations.getRelevantTransformation("ROTATE");
GL11.glRotated(equipSpin[0], 0, 0, 1);
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
GL11.glRotated(recoil[2] * 10, 0, 0, 1);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.debug_gun_tex);
ResourceManager.lilmac.renderPart("Gun");
GL11.glPushMatrix();
ResourceManager.lilmac.renderPart("Pivot");
GL11.glTranslated(0, 1.75, 0);
GL11.glRotated(HbmAnimations.getRelevantTransformation("DRUM")[2] * -60, 1, 0, 0);
GL11.glTranslated(0, -1.75, 0);
ResourceManager.lilmac.renderPart("Cylinder");
ResourceManager.lilmac.renderPart("Bullets");
ResourceManager.lilmac.renderPart("Casings");
ResourceManager.lilmac.renderPart("Pivot");
GL11.glPopMatrix();
GL11.glPushMatrix(); /// HAMMER ///
GL11.glTranslated(4, 1.25, 0);
GL11.glRotated(-30 + 30 * HbmAnimations.getRelevantTransformation("HAMMER")[2], 0, 0, 1);
GL11.glTranslated(-4, -1.25, 0);
ResourceManager.lilmac.renderPart("Hammer");
GL11.glPopMatrix();
GL11.glShadeModel(GL11.GL_FLAT);
}

View File

@ -4,7 +4,7 @@ import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import org.lwjgl.util.glu.Project;
import com.hbm.items.weapon.sedna.ItemGunBase;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@ -220,7 +220,7 @@ public abstract class ItemRenderWeaponBase implements IItemRenderer {
public abstract void renderOther(ItemStack stack, ItemRenderType type);
public static void standardAimingTransform(ItemStack stack, double sX, double sY, double sZ, double aX, double aY, double aZ) {
float aimingProgress = ItemGunBase.prevAimingProgress + (ItemGunBase.aimingProgress - ItemGunBase.prevAimingProgress) * interp;
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
double x = sX + (aX - sX) * aimingProgress;
double y = sY + (aY - sY) * aimingProgress;
double z = sZ + (aZ - sZ) * aimingProgress;

View File

@ -1,134 +0,0 @@
// Date: 06.04.2016 17:39:42
// 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 ModelAt4 extends ModelBase
{
//fields
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
ModelRenderer Shape6;
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape9;
public ModelAt4()
{
textureWidth = 64;
textureHeight = 32;
Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 18, 3, 2);
Shape1.setRotationPoint(-8F, 0F, 0F);
Shape1.setTextureSize(64, 32);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 0, 5);
Shape2.addBox(0F, 0F, 0F, 18, 2, 3);
Shape2.setRotationPoint(-8F, 0.5F, -0.5F);
Shape2.setTextureSize(64, 32);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 10);
Shape3.addBox(0F, 0F, 0F, 3, 4, 4);
Shape3.setRotationPoint(10F, -0.5F, -1F);
Shape3.setTextureSize(64, 32);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
Shape4 = new ModelRenderer(this, 0, 18);
Shape4.addBox(0F, 0F, 0F, 1, 3, 3);
Shape4.setRotationPoint(-9F, 0F, -0.5F);
Shape4.setTextureSize(64, 32);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F);
Shape5 = new ModelRenderer(this, 14, 10);
Shape5.addBox(0F, 0F, 0F, 1, 4, 4);
Shape5.setRotationPoint(-10F, -0.5F, -1F);
Shape5.setTextureSize(64, 32);
Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F);
Shape6 = new ModelRenderer(this, 0, 24);
Shape6.addBox(0F, 0F, 0F, 1, 3, 1);
Shape6.setRotationPoint(-6F, 3F, 0.5F);
Shape6.setTextureSize(64, 32);
Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F);
Shape7 = new ModelRenderer(this, 4, 24);
Shape7.addBox(0F, 0F, 0F, 1, 2, 1);
Shape7.setRotationPoint(-3F, 3F, 0.5F);
Shape7.setTextureSize(64, 32);
Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F);
Shape8 = new ModelRenderer(this, 8, 18);
Shape8.addBox(0F, 0F, 0F, 3, 1, 1);
Shape8.setRotationPoint(-6F, -0.5F, -2F);
Shape8.setTextureSize(64, 32);
Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, 0F);
Shape9 = new ModelRenderer(this, 0, 28);
Shape9.addBox(0F, 0F, 0F, 1, 1, 2);
Shape9.setRotationPoint(-5F, 0F, -1.5F);
Shape9.setTextureSize(64, 32);
Shape9.mirror = true;
setRotation(Shape9, 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);
Shape1.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.render(f5);
}
public void renderModel(float f5)
{
Shape1.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.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);
}
}

View File

@ -1,250 +0,0 @@
// Date: 14.01.2018 22:26: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 org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
public class ModelBoltAction extends ModelBase {
// fields
ModelRenderer Barrel1;
ModelRenderer Barrel2;
ModelRenderer Grip;
ModelRenderer BodyFront;
ModelRenderer BodyMain;
ModelRenderer LeverFront;
ModelRenderer LeverBottom;
ModelRenderer LeverMid;
ModelRenderer Trigger;
ModelRenderer GripFront;
ModelRenderer GropFrontBottom;
ModelRenderer GripBottom;
ModelRenderer Bolt;
ModelRenderer ChamberFront;
ModelRenderer ChamberBack;
ModelRenderer BodyBack;
ModelRenderer LeverTip;
ModelRenderer Lever;
ModelRenderer HandleFront;
ModelRenderer Pointer;
ModelRenderer HandleBottom;
ModelRenderer HandleGrip;
public ModelBoltAction() {
textureWidth = 128;
textureHeight = 64;
Barrel1 = new ModelRenderer(this, 0, 0);
Barrel1.addBox(0F, 0F, 0F, 60, 3, 2);
Barrel1.setRotationPoint(-60F, 1.5F, -1F);
Barrel1.setTextureSize(64, 32);
Barrel1.mirror = true;
setRotation(Barrel1, 0F, 0F, 0F);
Barrel2 = new ModelRenderer(this, 0, 5);
Barrel2.addBox(0F, 0F, 0F, 60, 2, 3);
Barrel2.setRotationPoint(-60F, 2F, -1.5F);
Barrel2.setTextureSize(64, 32);
Barrel2.mirror = true;
setRotation(Barrel2, 0F, 0F, 0F);
Grip = new ModelRenderer(this, 0, 10);
Grip.addBox(0F, 0F, 0F, 28, 5, 4);
Grip.setRotationPoint(-28F, 3F, -2F);
Grip.setTextureSize(64, 32);
Grip.mirror = true;
setRotation(Grip, 0F, 0F, 0F);
BodyFront = new ModelRenderer(this, 0, 19);
BodyFront.addBox(0F, 0F, 0F, 3, 7, 4);
BodyFront.setRotationPoint(0F, 2.5F, -2F);
BodyFront.setTextureSize(64, 32);
BodyFront.mirror = true;
setRotation(BodyFront, 0F, 0F, 0F);
BodyMain = new ModelRenderer(this, 14, 19);
BodyMain.addBox(0F, 0F, 0F, 8, 7, 4);
BodyMain.setRotationPoint(3F, 2.5F, -2F);
BodyMain.setTextureSize(64, 32);
BodyMain.mirror = true;
setRotation(BodyMain, 0F, 0F, 0F);
LeverFront = new ModelRenderer(this, 62, 30);
LeverFront.addBox(-1F, 0F, 0F, 2, 4, 2);
LeverFront.setRotationPoint(7F, 9F, -1F);
LeverFront.setTextureSize(64, 32);
LeverFront.mirror = true;
setRotation(LeverFront, 0F, 0F, 0F);
LeverBottom = new ModelRenderer(this, 70, 30);
LeverBottom.addBox(0F, 4F, 0F, 6, 1, 2);
LeverBottom.setRotationPoint(7F, 9F, -1F);
LeverBottom.setTextureSize(64, 32);
LeverBottom.mirror = true;
setRotation(LeverBottom, 0F, 0F, 0F);
LeverMid = new ModelRenderer(this, 62, 36);
LeverMid.addBox(6F, 0F, 0F, 1, 5, 2);
LeverMid.setRotationPoint(7F, 9F, -1F);
LeverMid.setTextureSize(64, 32);
LeverMid.mirror = true;
setRotation(LeverMid, 0F, 0F, 0F);
Trigger = new ModelRenderer(this, 88, 30);
Trigger.addBox(-1F, 0F, 0F, 1, 3, 1);
Trigger.setRotationPoint(12.5F, 9F, -0.5F);
Trigger.setTextureSize(64, 32);
Trigger.mirror = true;
setRotation(Trigger, 0F, 0F, 0.3490659F);
GripFront = new ModelRenderer(this, 0, 30);
GripFront.addBox(0F, 0F, 0F, 18, 3, 4);
GripFront.setRotationPoint(-46F, 3F, -2F);
GripFront.setTextureSize(128, 64);
GripFront.mirror = true;
setRotation(GripFront, 0F, 0F, 0F);
GropFrontBottom = new ModelRenderer(this, 0, 37);
GropFrontBottom.addBox(0F, 0F, 0F, 18, 1, 2);
GropFrontBottom.setRotationPoint(-46F, 6F, -1F);
GropFrontBottom.setTextureSize(128, 64);
GropFrontBottom.mirror = true;
setRotation(GropFrontBottom, 0F, 0F, 0F);
GripBottom = new ModelRenderer(this, 0, 40);
GripBottom.addBox(0F, 0F, 0F, 28, 1, 2);
GripBottom.setRotationPoint(-28F, 8F, -1F);
GripBottom.setTextureSize(128, 64);
GripBottom.mirror = true;
setRotation(GripBottom, 0F, 0F, 0F);
Bolt = new ModelRenderer(this, 0, 43);
Bolt.addBox(0F, 0F, 0F, 10, 2, 2);
Bolt.setRotationPoint(3F, 2F, -1F);
Bolt.setTextureSize(128, 64);
Bolt.mirror = true;
setRotation(Bolt, 0F, 0F, 0F);
ChamberFront = new ModelRenderer(this, 0, 47);
ChamberFront.addBox(0F, 0F, 0F, 3, 1, 3);
ChamberFront.setRotationPoint(0F, 1.5F, -1.5F);
ChamberFront.setTextureSize(128, 64);
ChamberFront.mirror = true;
setRotation(ChamberFront, 0F, 0F, 0F);
ChamberBack = new ModelRenderer(this, 12, 47);
ChamberBack.addBox(0F, 0F, 0F, 3, 1, 3);
ChamberBack.setRotationPoint(8F, 1.5F, -1.5F);
ChamberBack.setTextureSize(128, 64);
ChamberBack.mirror = true;
setRotation(ChamberBack, 0F, 0F, 0F);
BodyBack = new ModelRenderer(this, 0, 51);
BodyBack.addBox(0F, 0F, 0F, 4, 6, 4);
BodyBack.setRotationPoint(11F, 3.5F, -2F);
BodyBack.setTextureSize(128, 64);
BodyBack.mirror = true;
setRotation(BodyBack, 0F, 0F, 0F);
LeverTip = new ModelRenderer(this, 24, 43);
LeverTip.addBox(0F, -1F, 3F, 2, 2, 2);
LeverTip.setRotationPoint(11F, 3F, 0F);
LeverTip.setTextureSize(128, 64);
LeverTip.mirror = true;
setRotation(LeverTip, -0.4363323F, 0F, 0F);
Lever = new ModelRenderer(this, 32, 43);
Lever.addBox(0F, -0.5F, 0F, 1, 1, 4);
Lever.setRotationPoint(11.5F, 3F, 0F);
Lever.setTextureSize(128, 64);
Lever.mirror = true;
setRotation(Lever, -0.4363323F, 0F, 0F);
HandleFront = new ModelRenderer(this, 16, 51);
HandleFront.addBox(0F, 0F, 0F, 9, 5, 4);
HandleFront.setRotationPoint(15F, 4.5F, -2F);
HandleFront.setTextureSize(128, 64);
HandleFront.mirror = true;
setRotation(HandleFront, 0F, 0F, 0.4363323F);
Pointer = new ModelRenderer(this, 42, 43);
Pointer.addBox(0F, 0F, 0F, 3, 1, 1);
Pointer.setRotationPoint(-49F, 5.5F, -0.5F);
Pointer.setTextureSize(128, 64);
Pointer.mirror = true;
setRotation(Pointer, 0F, 0F, 0F);
HandleBottom = new ModelRenderer(this, 64, 10);
HandleBottom.addBox(0F, -8F, 0F, 23, 8, 4);
HandleBottom.setRotationPoint(19F, 16F, -2F);
HandleBottom.setTextureSize(128, 64);
HandleBottom.mirror = true;
setRotation(HandleBottom, 0F, 0F, 0F);
HandleGrip = new ModelRenderer(this, 38, 19);
HandleGrip.addBox(0F, 0F, 0F, 2, 5, 4);
HandleGrip.setRotationPoint(17F, 9.5F, -2F);
HandleGrip.setTextureSize(128, 64);
HandleGrip.mirror = true;
setRotation(HandleGrip, 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);
Barrel1.render(f5);
Barrel2.render(f5);
Grip.render(f5);
BodyFront.render(f5);
BodyMain.render(f5);
LeverFront.render(f5);
LeverBottom.render(f5);
LeverMid.render(f5);
Trigger.render(f5);
GripFront.render(f5);
GropFrontBottom.render(f5);
GripBottom.render(f5);
Bolt.render(f5);
ChamberFront.render(f5);
ChamberBack.render(f5);
BodyBack.render(f5);
LeverTip.render(f5);
Lever.render(f5);
HandleFront.render(f5);
Pointer.render(f5);
HandleBottom.render(f5);
HandleGrip.render(f5);
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
Tessellator tessellator = Tessellator.instance;
int color = 0x00FF00;
tessellator.startDrawing(3);
tessellator.setColorOpaque_I(color);
tessellator.addVertex(-32F / 16F, 0 + 4F / 16F, 0);
tessellator.addVertex(-150, 0, 0);
tessellator.draw();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glPopMatrix();
}
public void renderAnim(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, float rot, float tran) {
LeverTip.rotateAngleX += rot;
Lever.rotateAngleX += rot;
Bolt.offsetX += tran;
LeverTip.offsetX += tran;
Lever.offsetX += tran;
render(entity, f, f1, f2, f3, f4, f5);
setRotation(LeverTip, -0.4363323F, 0F, 0F);
setRotation(Lever, -0.4363323F, 0F, 0F);
Bolt.offsetX -= tran;
LeverTip.offsetX -= tran;
Lever.offsetX -= tran;
}
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);
}
}

View File

@ -1,122 +0,0 @@
//This File was created with the Minecraft-SMP Modelling Toolbox 2.3.0.0
// Copyright (C) 2017 Minecraft-SMP.de
// This file is for Flan's Flying Mod Version 4.0.x+
// Model: ModelDash
// Model Creator:
// Created on: 01.11.2017 - 20:07:57
// Last changed on: 01.11.2017 - 20:07:57
package com.hbm.render.model; //Path where the model is located
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelDash extends ModelBase //Same as Filename
{
int textureX = 64;
int textureY = 64;
ModelRenderer[] bodyModel;
public ModelDash() //Same as Filename
{
textureWidth = 64;
textureHeight = 64;
bodyModel = new ModelRenderer[16];
bodyModel[0] = new ModelRenderer(this, 1, 1); // Box 0
bodyModel[1] = new ModelRenderer(this, 25, 1); // Box 1
bodyModel[2] = new ModelRenderer(this, 1, 9); // Box 2
bodyModel[3] = new ModelRenderer(this, 33, 9); // Box 3
bodyModel[4] = new ModelRenderer(this, 57, 1); // Box 4
bodyModel[5] = new ModelRenderer(this, 1, 17); // Box 5
bodyModel[6] = new ModelRenderer(this, 9, 17); // Box 6
bodyModel[7] = new ModelRenderer(this, 17, 17); // Box 7
bodyModel[8] = new ModelRenderer(this, 41, 17); // Box 8
bodyModel[9] = new ModelRenderer(this, 1, 25); // Box 9
bodyModel[10] = new ModelRenderer(this, 17, 25); // Box 10
bodyModel[11] = new ModelRenderer(this, 41, 25); // Box 11
bodyModel[12] = new ModelRenderer(this, 49, 25); // Box 12
bodyModel[13] = new ModelRenderer(this, 1, 33); // Box 13
bodyModel[14] = new ModelRenderer(this, 17, 33); // Box 14
bodyModel[15] = new ModelRenderer(this, 25, 33); // Box 16
bodyModel[0].addBox(0F, 0F, 0F, 7, 3, 3, 0F); // Box 0
bodyModel[0].setRotationPoint(0F, 0F, -1.5F);
bodyModel[1].addBox(0F, 0F, -1F, 12, 3, 2, 0F); // Box 1
bodyModel[1].setRotationPoint(-12F, 1F, 0F);
bodyModel[2].addBox(0F, 0F, -1F, 12, 3, 2, 0F); // Box 2
bodyModel[2].setRotationPoint(-12F, 1F, 0F);
bodyModel[2].rotateAngleX = 2.0943951F;
bodyModel[3].addBox(0F, 0F, -1F, 12, 3, 2, 0F); // Box 3
bodyModel[3].setRotationPoint(-12F, 1F, 0F);
bodyModel[3].rotateAngleX = -2.0943951F;
bodyModel[4].addBox(0F, 1.5F, -0.5F, 1, 1, 1, 0F); // Box 4
bodyModel[4].setRotationPoint(-12.5F, 1F, 0F);
bodyModel[5].addBox(0F, 1.5F, -0.5F, 1, 1, 1, 0F); // Box 5
bodyModel[5].setRotationPoint(-12.5F, 1F, 0F);
bodyModel[5].rotateAngleX = 2.0943951F;
bodyModel[6].addBox(0F, 1.5F, -0.5F, 1, 1, 1, 0F); // Box 6
bodyModel[6].setRotationPoint(-12.5F, 1F, 0F);
bodyModel[6].rotateAngleX = -2.0943951F;
bodyModel[7].addBox(0F, 0F, 0F, 7, 1, 2, 0F); // Box 7
bodyModel[7].setRotationPoint(0F, -0.5F, -1F);
bodyModel[8].addBox(0F, 0F, 0F, 7, 2, 2, 0F); // Box 8
bodyModel[8].setRotationPoint(7F, 0.5F, -1F);
bodyModel[9].addBox(0F, 0F, 0F, 2, 2, 2, 0F); // Box 9
bodyModel[9].setRotationPoint(12F, 2.5F, -1F);
bodyModel[10].addBox(-6F, -2F, 0F, 6, 2, 2, 0F); // Box 10
bodyModel[10].setRotationPoint(12F, 4.5F, -1F);
bodyModel[10].rotateAngleZ = 0.29670597F;
bodyModel[11].addBox(0F, 0F, 0F, 1, 3, 1, 0F); // Box 11
bodyModel[11].setRotationPoint(6F, 3F, -0.5F);
bodyModel[11].rotateAngleZ = -0.26179939F;
bodyModel[12].addBox(0F, 0F, 0F, 5, 2, 2, 0F); // Box 12
bodyModel[12].setRotationPoint(0F, 3F, -1F);
bodyModel[13].addBox(0F, 0F, 0F, 6, 1, 1, 0F); // Box 13
bodyModel[13].setRotationPoint(2F, 5F, -0.5F);
bodyModel[14].addBox(0F, 0F, 0F, 1, 4, 1, 0F); // Box 14
bodyModel[14].setRotationPoint(0.5F, 1F, -1.5F);
bodyModel[14].rotateAngleX = -0.61086524F;
bodyModel[15].addBox(0F, 0F, 0F, 3, 1, 1, 0F); // Box 16
bodyModel[15].setRotationPoint(3F, -1F, -0.5F);
for(int i = 0; i < 16; i++)
{
bodyModel[i].setTextureSize(textureX, textureY);
bodyModel[i].mirror = true;
}
}
@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);
for(int i = 0; i < 16; i++)
{
bodyModel[i].render(f5);
}
}
@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);
}
}

View File

@ -1,9 +0,0 @@
package com.hbm.render.model;
public class ModelGloves {
//TODO: make the rubber gloves actually render when worn
public ModelGloves() {
}
}

View File

@ -1,67 +0,0 @@
// 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);
}
}

View File

@ -1,198 +0,0 @@
// Date: 08.12.2016 20:24:28
// 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 org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.ItemGunBase;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
public class ModelNightmare extends ModelBase {
// fields
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
ModelRenderer Shape6;
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape9;
ModelRenderer Shape10;
ModelRenderer Shape11;
ModelRenderer Shape12;
ModelRenderer Bullet1;
ModelRenderer Bullet2;
ModelRenderer Bullet3;
ModelRenderer Bullet4;
ModelRenderer Bullet5;
ModelRenderer Bullet6;
public ModelNightmare() {
textureWidth = 64;
textureHeight = 32;
Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 3, 8, 2);
Shape1.setRotationPoint(0F, 0F, 0F);
Shape1.setTextureSize(64, 32);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, -0.3490659F);
Shape2 = new ModelRenderer(this, 42, 0);
Shape2.addBox(0F, 0F, 0F, 9, 6, 2);
Shape2.setRotationPoint(-8F, -5F, 0F);
Shape2.setTextureSize(64, 32);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 14);
Shape3.addBox(0F, 0F, 0F, 4, 2, 1);
Shape3.setRotationPoint(-0.03333334F, -3F, 0.5F);
Shape3.setTextureSize(64, 32);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0.715585F);
Shape4 = new ModelRenderer(this, 22, 0);
Shape4.addBox(0F, 0F, 0F, 6, 4, 3);
Shape4.setRotationPoint(-7F, -4F, 0F);
Shape4.setTextureSize(64, 32);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F);
Shape5 = new ModelRenderer(this, 0, 0);
Shape5.addBox(0F, 0F, 0F, 1, 1, 1);
Shape5.setRotationPoint(0F, 0F, 0F);
Shape5.setTextureSize(64, 32);
Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, 0F);
Shape6 = new ModelRenderer(this, 34, 8);
Shape6.addBox(0F, 0F, 0F, 13, 2, 2);
Shape6.setRotationPoint(-21F, -4F, 0F);
Shape6.setTextureSize(64, 32);
Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F);
Shape7 = new ModelRenderer(this, 0, 17);
Shape7.addBox(0F, 0F, 0F, 1, 2, 1);
Shape7.setRotationPoint(2F, -3F, 0.5F);
Shape7.setTextureSize(64, 32);
Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0.715585F);
Shape8 = new ModelRenderer(this, 4, 17);
Shape8.addBox(0F, 0F, 0F, 2, 1, 1);
Shape8.setRotationPoint(2F, -4F, 0.5F);
Shape8.setTextureSize(64, 32);
Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, 0.715585F);
Shape9 = new ModelRenderer(this, 0, 20);
Shape9.addBox(0F, 0F, 0F, 6, 1, 1);
Shape9.setRotationPoint(-14F, -2F, 0.5F);
Shape9.setTextureSize(64, 32);
Shape9.mirror = true;
setRotation(Shape9, 0F, 0F, 0F);
Shape10 = new ModelRenderer(this, 26, 8);
Shape10.addBox(0F, 0F, 0F, 2, 2, 2);
Shape10.setRotationPoint(-19F, -5F, 0F);
Shape10.setTextureSize(64, 32);
Shape10.mirror = true;
setRotation(Shape10, 0F, 0F, 0.6108652F);
Shape11 = new ModelRenderer(this, 0, 10);
Shape11.addBox(0F, 0F, 0F, 4, 3, 1);
Shape11.setRotationPoint(-2F, 1F, 0.5F);
Shape11.setTextureSize(64, 32);
Shape11.mirror = true;
setRotation(Shape11, 0F, 0F, 0F);
Shape12 = new ModelRenderer(this, 10, 0);
Shape12.addBox(0F, 0F, 0F, 1, 3, 1);
Shape12.setRotationPoint(0F, 0F, 0.5F);
Shape12.setTextureSize(64, 32);
Shape12.mirror = true;
setRotation(Shape12, 0F, 0F, 0.5235988F);
Bullet1 = new ModelRenderer(this, 6, 22);
Bullet1.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet1.setRotationPoint(-7.5F, -4F, -1F);
Bullet1.setTextureSize(64, 32);
Bullet1.mirror = true;
setRotation(Bullet1, 0F, 0F, 0F);
Bullet2 = new ModelRenderer(this, 0, 22);
Bullet2.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet2.setRotationPoint(-6.5F, -4F, -1F);
Bullet2.setTextureSize(64, 32);
Bullet2.mirror = true;
setRotation(Bullet2, 0F, 0F, 0F);
Bullet3 = new ModelRenderer(this, 6, 22);
Bullet3.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet3.setRotationPoint(-4.5F, -4F, -1F);
Bullet3.setTextureSize(64, 32);
Bullet3.mirror = true;
setRotation(Bullet3, 0F, 0F, 0F);
Bullet4 = new ModelRenderer(this, 0, 22);
Bullet4.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet4.setRotationPoint(-3.5F, -4F, -1F);
Bullet4.setTextureSize(64, 32);
Bullet4.mirror = true;
setRotation(Bullet4, 0F, 0F, 0F);
Bullet5 = new ModelRenderer(this, 6, 22);
Bullet5.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet5.setRotationPoint(-1.5F, -4F, -1F);
Bullet5.setTextureSize(64, 32);
Bullet5.mirror = true;
setRotation(Bullet5, 0F, 0F, 0F);
Bullet6 = new ModelRenderer(this, 0, 22);
Bullet6.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet6.setRotationPoint(-0.5F, -4F, -1F);
Bullet6.setTextureSize(64, 32);
Bullet6.mirror = true;
setRotation(Bullet6, 0F, 0F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ItemStack item) {
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);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.render(f5);
Shape10.render(f5);
Shape11.render(f5);
Shape12.render(f5);
GL11.glEnable(GL11.GL_CULL_FACE);
int ammo = ItemGunBase.getMag(item);
if(ammo > 0)
Bullet1.render(f5);
if(ammo > 1)
Bullet2.render(f5);
if(ammo > 2)
Bullet3.render(f5);
if(ammo > 3)
Bullet4.render(f5);
if(ammo > 4)
Bullet5.render(f5);
if(ammo > 5)
Bullet6.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);
}
}

View File

@ -1,265 +0,0 @@
// Date: 08.12.2016 20:42:59
// 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 org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.ItemGunBase;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
public class ModelNightmare2 extends ModelBase {
// fields
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape6;
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape9;
ModelRenderer Shape10;
ModelRenderer Shape11;
ModelRenderer Shape12;
ModelRenderer Bullet1;
ModelRenderer Bullet2;
ModelRenderer Bullet3;
ModelRenderer Bullet4;
ModelRenderer Bullet5;
ModelRenderer Bullet6;
ModelRenderer Shape13;
ModelRenderer Shape14;
ModelRenderer Shape15;
ModelRenderer Shape16;
ModelRenderer Shape17;
ModelRenderer Shape18;
ModelRenderer Shape19;
public ModelNightmare2() {
textureWidth = 64;
textureHeight = 32;
Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 3, 8, 2);
Shape1.setRotationPoint(0F, 0F, 0F);
Shape1.setTextureSize(64, 32);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, -0.3490659F);
Shape2 = new ModelRenderer(this, 42, 0);
Shape2.addBox(0F, 0F, 0F, 9, 6, 2);
Shape2.setRotationPoint(-8F, -5F, 0F);
Shape2.setTextureSize(64, 32);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 0, 14);
Shape3.addBox(0F, 0F, 0F, 4, 2, 1);
Shape3.setRotationPoint(-0.03333334F, -3F, 0.5F);
Shape3.setTextureSize(64, 32);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0.715585F);
Shape4 = new ModelRenderer(this, 22, 0);
Shape4.addBox(0F, 0F, 0F, 6, 4, 3);
Shape4.setRotationPoint(-7F, -4F, 0F);
Shape4.setTextureSize(64, 32);
Shape4.mirror = true;
setRotation(Shape4, 0F, 0F, 0F);
Shape6 = new ModelRenderer(this, 34, 8);
Shape6.addBox(0F, 0F, 0F, 13, 2, 2);
Shape6.setRotationPoint(-21F, -4F, 0F);
Shape6.setTextureSize(64, 32);
Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F);
Shape7 = new ModelRenderer(this, 0, 17);
Shape7.addBox(0F, 0F, 0F, 1, 2, 1);
Shape7.setRotationPoint(2F, -3F, 0.5F);
Shape7.setTextureSize(64, 32);
Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0.715585F);
Shape8 = new ModelRenderer(this, 4, 17);
Shape8.addBox(0F, 0F, 0F, 2, 1, 1);
Shape8.setRotationPoint(2F, -4F, 0.5F);
Shape8.setTextureSize(64, 32);
Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, 0.715585F);
Shape9 = new ModelRenderer(this, 0, 20);
Shape9.addBox(0F, 0F, 0F, 6, 1, 1);
Shape9.setRotationPoint(-14F, -2F, 0.5F);
Shape9.setTextureSize(64, 32);
Shape9.mirror = true;
setRotation(Shape9, 0F, 0F, 0F);
Shape10 = new ModelRenderer(this, 26, 8);
Shape10.addBox(0F, 0F, 0F, 2, 2, 2);
Shape10.setRotationPoint(-19F, -5F, 0F);
Shape10.setTextureSize(64, 32);
Shape10.mirror = true;
setRotation(Shape10, 0F, 0F, 0.6108652F);
Shape11 = new ModelRenderer(this, 0, 10);
Shape11.addBox(0F, 0F, 0F, 4, 3, 1);
Shape11.setRotationPoint(-2F, 1F, 0.5F);
Shape11.setTextureSize(64, 32);
Shape11.mirror = true;
setRotation(Shape11, 0F, 0F, 0F);
Shape12 = new ModelRenderer(this, 10, 0);
Shape12.addBox(0F, 0F, 0F, 1, 3, 1);
Shape12.setRotationPoint(0F, 0F, 0.5F);
Shape12.setTextureSize(64, 32);
Shape12.mirror = true;
setRotation(Shape12, 0F, 0F, 0.5235988F);
Bullet1 = new ModelRenderer(this, 6, 22);
Bullet1.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet1.setRotationPoint(-7.5F, -4F, -1F);
Bullet1.setTextureSize(64, 32);
Bullet1.mirror = true;
setRotation(Bullet1, 0F, 0F, 0F);
Bullet2 = new ModelRenderer(this, 0, 22);
Bullet2.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet2.setRotationPoint(-6.5F, -4F, -1F);
Bullet2.setTextureSize(64, 32);
Bullet2.mirror = true;
setRotation(Bullet2, 0F, 0F, 0F);
Bullet3 = new ModelRenderer(this, 6, 22);
Bullet3.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet3.setRotationPoint(-4.5F, -4F, -1F);
Bullet3.setTextureSize(64, 32);
Bullet3.mirror = true;
setRotation(Bullet3, 0F, 0F, 0F);
Bullet4 = new ModelRenderer(this, 0, 22);
Bullet4.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet4.setRotationPoint(-3.5F, -4F, -1F);
Bullet4.setTextureSize(64, 32);
Bullet4.mirror = true;
setRotation(Bullet4, 0F, 0F, 0F);
Bullet5 = new ModelRenderer(this, 6, 22);
Bullet5.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet5.setRotationPoint(-1.5F, -4F, -1F);
Bullet5.setTextureSize(64, 32);
Bullet5.mirror = true;
setRotation(Bullet5, 0F, 0F, 0F);
Bullet6 = new ModelRenderer(this, 0, 22);
Bullet6.addBox(0F, 0F, 0F, 1, 2, 1);
Bullet6.setRotationPoint(-0.5F, -4F, -1F);
Bullet6.setTextureSize(64, 32);
Bullet6.mirror = true;
setRotation(Bullet6, 0F, 0F, 0F);
Shape13 = new ModelRenderer(this, 14, 0);
Shape13.addBox(0F, 0F, 0F, 1, 1, 2);
Shape13.setRotationPoint(-13F, -3.5F, -2F);
Shape13.setTextureSize(64, 32);
Shape13.mirror = true;
setRotation(Shape13, 0F, 0F, 0F);
Shape14 = new ModelRenderer(this, 34, 12);
Shape14.addBox(0F, 0F, 0F, 6, 1, 1);
Shape14.setRotationPoint(-19F, -3.5F, -1.533333F);
Shape14.setTextureSize(64, 32);
Shape14.mirror = true;
setRotation(Shape14, 0F, 0F, 0F);
Shape15 = new ModelRenderer(this, 10, 4);
Shape15.addBox(0F, 0F, 0F, 1, 5, 1);
Shape15.setRotationPoint(-4F, -5F, 3F);
Shape15.setTextureSize(64, 32);
Shape15.mirror = true;
setRotation(Shape15, 0F, 0F, 0F);
Shape16 = new ModelRenderer(this, 10, 10);
Shape16.addBox(-1F, -4F, 0F, 1, 4, 1);
Shape16.setRotationPoint(-3F, -5F, 3F);
Shape16.setTextureSize(64, 32);
Shape16.mirror = true;
setRotation(Shape16, 0F, 0F, -0.5235988F);
Shape17 = new ModelRenderer(this, 14, 8);
Shape17.addBox(0F, 0F, 0F, 5, 1, 1);
Shape17.setRotationPoint(-10F, -8.5F, 3F);
Shape17.setTextureSize(64, 32);
Shape17.mirror = true;
setRotation(Shape17, 0F, 0F, 0F);
Shape18 = new ModelRenderer(this, 14, 12);
Shape18.addBox(-9F, 0F, 0F, 9, 1, 1);
Shape18.setRotationPoint(-10F, -8.5F, 3F);
Shape18.setTextureSize(64, 32);
Shape18.mirror = true;
setRotation(Shape18, 0F, 0F, -0.6108652F);
Shape19 = new ModelRenderer(this, 14, 10);
Shape19.addBox(-5F, 0F, -1F, 5, 1, 1);
Shape19.setRotationPoint(-16F, -3.5F, 4F);
Shape19.setTextureSize(64, 32);
Shape19.mirror = true;
setRotation(Shape19, 0F, -0.4461433F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ItemStack item) {
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);
Shape4.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.render(f5);
Shape10.render(f5);
Shape11.render(f5);
Shape12.render(f5);
GL11.glEnable(GL11.GL_CULL_FACE);
Shape13.render(f5);
Shape14.render(f5);
Shape15.render(f5);
Shape16.render(f5);
Shape17.render(f5);
Shape18.render(f5);
Shape19.render(f5);
int ammo = ItemGunBase.getMag(item);
if(ammo > 0)
Bullet1.render(f5);
if(ammo > 1)
Bullet2.render(f5);
if(ammo > 2)
Bullet3.render(f5);
if(ammo > 3)
Bullet4.render(f5);
if(ammo > 4)
Bullet5.render(f5);
if(ammo > 5)
Bullet6.render(f5);
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
Tessellator tessellator = Tessellator.instance;
int color = 0xFF0000;
tessellator.startDrawing(3);
tessellator.setColorOpaque_I(color);
tessellator.addVertex(-19F / 16F, -3F / 16F, -1F / 16F);
tessellator.addVertex(-150, 0, 0);
tessellator.draw();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glPopMatrix();
}
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);
}
}

View File

@ -1,223 +0,0 @@
//This File was created with the Minecraft-SMP Modelling Toolbox 2.3.0.0
// Copyright (C) 2017 Minecraft-SMP.de
// This file is for Flan's Flying Mod Version 4.0.x+
// Model: Pip
// Model Creator:
// Created on:09.12.2017 - 12:48:52
// Last changed on: 09.12.2017 - 12:48:52
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;
public class ModelPip extends ModelBase
{
public ModelRenderer pipModel[];
int textureX = 128;
int textureY = 128;
public ModelPip()
{
textureWidth = 128;
textureHeight = 128;
pipModel = new ModelRenderer[39];
pipModel[0] = new ModelRenderer(this, 1, 1); // Box 0
pipModel[1] = new ModelRenderer(this, 49, 1); // Box 1
pipModel[2] = new ModelRenderer(this, 97, 1); // Box 2
pipModel[3] = new ModelRenderer(this, 1, 9); // Box 3
pipModel[4] = new ModelRenderer(this, 25, 9); // Box 4
pipModel[5] = new ModelRenderer(this, 49, 9); // Box 5
pipModel[6] = new ModelRenderer(this, 73, 9); // Box 6
pipModel[7] = new ModelRenderer(this, 81, 17); // Box 7
pipModel[8] = new ModelRenderer(this, 97, 17); // Box 10
pipModel[9] = new ModelRenderer(this, 1, 25); // Box 12
pipModel[10] = new ModelRenderer(this, 1, 9); // Box 14
pipModel[11] = new ModelRenderer(this, 17, 25); // Box 15
pipModel[12] = new ModelRenderer(this, 41, 25); // Box 16
pipModel[13] = new ModelRenderer(this, 49, 9); // Box 17
pipModel[14] = new ModelRenderer(this, 113, 17); // Box 18
pipModel[15] = new ModelRenderer(this, 73, 17); // Box 19
pipModel[16] = new ModelRenderer(this, 65, 25); // Box 20
pipModel[17] = new ModelRenderer(this, 113, 25); // Box 22
pipModel[18] = new ModelRenderer(this, 65, 25); // Box 23
pipModel[19] = new ModelRenderer(this, 1, 33); // Box 24
pipModel[20] = new ModelRenderer(this, 81, 33); // Box 25
pipModel[21] = new ModelRenderer(this, 1, 41); // Box 26
pipModel[22] = new ModelRenderer(this, 89, 33); // Box 27
pipModel[23] = new ModelRenderer(this, 105, 33); // Box 28
pipModel[24] = new ModelRenderer(this, 33, 41); // Box 29
pipModel[25] = new ModelRenderer(this, 49, 41); // Box 30
pipModel[26] = new ModelRenderer(this, 65, 41); // Box 31
pipModel[27] = new ModelRenderer(this, 105, 41); // Box 32
pipModel[28] = new ModelRenderer(this, 1, 49); // Box 33
pipModel[29] = new ModelRenderer(this, 17, 49); // Box 34
pipModel[30] = new ModelRenderer(this, 33, 49); // Box 35
pipModel[31] = new ModelRenderer(this, 57, 49); // Box 36
pipModel[32] = new ModelRenderer(this, 81, 49); // Box 37
pipModel[33] = new ModelRenderer(this, 105, 49); // Box 38
pipModel[34] = new ModelRenderer(this, 1, 57); // Box 39
pipModel[35] = new ModelRenderer(this, 89, 25); // Box 40
pipModel[36] = new ModelRenderer(this, 97, 41); // Box 41
pipModel[37] = new ModelRenderer(this, 49, 49); // Box 42
pipModel[38] = new ModelRenderer(this, 73, 57); // Box 43
pipModel[0].addBox(0F, 0F, 0F, 20, 3, 2, 0F); // Box 0
pipModel[0].setRotationPoint(-20F, -5.5F, -1F);
pipModel[1].addBox(0F, 0F, 0F, 20, 2, 3, 0F); // Box 1
pipModel[1].setRotationPoint(-20F, -5F, -1.5F);
pipModel[2].addBox(0F, 0F, 0F, 10, 8, 3, 0F); // Box 2
pipModel[2].setRotationPoint(0F, -6F, -1.5F);
pipModel[3].addBox(0F, 0F, 0F, 6, 5, 5, 0F); // Box 3
pipModel[3].setRotationPoint(2F, -5F, -2.5F);
pipModel[4].addBox(0F, 0F, 0F, 6, 6, 4, 0F); // Box 4
pipModel[4].setRotationPoint(2F, -5.5F, -2F);
pipModel[5].addBox(0F, 0F, 0F, 6, 4, 6, 0F); // Box 5
pipModel[5].setRotationPoint(2F, -4.5F, -3F);
pipModel[6].addBox(0F, 0F, 0F, 7, 2, 1, 0F); // Box 6
pipModel[6].setRotationPoint(-7F, -2.5F, -0.5F);
pipModel[7].addBox(-6F, 0F, 0F, 6, 3, 1, 0F); // Box 7
pipModel[7].setRotationPoint(15F, -2.5F, -1.5F);
pipModel[7].rotateAngleZ = 0.61086524F;
pipModel[8].addBox(0F, 0F, 0F, 5, 5, 3, 0F); // Box 10
pipModel[8].setRotationPoint(10F, -2.5F, -1.5F);
pipModel[9].addBox(-6F, 0F, 0F, 6, 3, 1, 0F); // Box 12
pipModel[9].setRotationPoint(15F, -2.5F, 0.5F);
pipModel[9].rotateAngleZ = 0.61086524F;
pipModel[10].addBox(-6F, 0F, 0F, 1, 3, 1, 0F); // Box 14
pipModel[10].setRotationPoint(15F, -2.5F, -0.5F);
pipModel[10].rotateAngleZ = 0.61086524F;
pipModel[11].addBox(0F, 0F, 0F, 6, 6, 4, 0F); // Box 15
pipModel[11].setRotationPoint(12F, 4F, -2F);
pipModel[12].addBox(-5F, -7F, 0F, 5, 7, 4, 0F); // Box 16
pipModel[12].setRotationPoint(18F, 4F, -2F);
pipModel[12].rotateAngleZ = -0.52359878F;
pipModel[13].addBox(0F, -2F, 0F, 1, 2, 1, 0F); // Box 17
pipModel[13].setRotationPoint(12F, -2.5F, -0.5F);
pipModel[13].rotateAngleZ = 0.34906585F;
pipModel[14].addBox(-0.5F, -3F, 0F, 3, 1, 1, 0F); // Box 18
pipModel[14].setRotationPoint(12F, -2.5F, -0.5F);
pipModel[14].rotateAngleZ = 0.34906585F;
pipModel[15].addBox(0F, 0F, 0F, 1, 3, 5, 0F); // Box 19
pipModel[15].setRotationPoint(8F, -4F, -2.5F);
pipModel[16].addBox(0F, 0F, 0F, 1, 3, 5, 0F); // Box 20
pipModel[16].setRotationPoint(1F, -4F, -2.5F);
pipModel[17].addBox(0F, 0F, 0F, 5, 3, 2, 0F); // Box 22
pipModel[17].setRotationPoint(5F, 2F, -1F);
pipModel[18].addBox(-1F, -0.5F, 0F, 1, 3, 1, 0F); // Box 23
pipModel[18].setRotationPoint(9F, 2F, -0.5F);
pipModel[18].rotateAngleZ = 0.43633231F;
pipModel[19].addBox(0F, 0F, 0F, 5, 1, 2, 0F); // Box 24
pipModel[19].setRotationPoint(-19.5F, -6.5F, -1F);
pipModel[20].addBox(0F, 0F, 0F, 4, 1, 1, 0F); // Box 25
pipModel[20].setRotationPoint(-19F, -7.5F, -0.5F);
pipModel[20].rotateAngleZ = 0.26179939F;
pipModel[21].addBox(0F, 0F, 0F, 15, 1, 2, 0F); // Box 26
pipModel[21].setRotationPoint(-4F, -7F, -1F);
pipModel[22].addBox(1F, 0F, 0F, 3, 4, 3, 0F); // Box 27
pipModel[22].setRotationPoint(-3F, -12F, -1.5F);
pipModel[23].addBox(1F, 0F, 0F, 3, 3, 4, 0F); // Box 28
pipModel[23].setRotationPoint(-3F, -11.5F, -2F);
pipModel[24].addBox(0F, 0F, 0F, 3, 3, 4, 0F); // Box 29
pipModel[24].setRotationPoint(6F, -11.5F, -2F);
pipModel[25].addBox(0F, 0F, 0F, 3, 4, 3, 0F); // Box 30
pipModel[25].setRotationPoint(6F, -12F, -1.5F);
pipModel[26].addBox(0F, 0F, 0F, 13, 3, 3, 0F); // Box 31
pipModel[26].setRotationPoint(-3F, -11.5F, -1.5F);
pipModel[27].addBox(0F, 0F, 0F, 3, 4, 3, 0F); // Box 32
pipModel[27].setRotationPoint(-6F, -12F, -1.5F);
pipModel[28].addBox(0F, 0F, 0F, 3, 3, 4, 0F); // Box 33
pipModel[28].setRotationPoint(-6F, -11.5F, -2F);
pipModel[29].addBox(0F, 0F, 0F, 4, 5, 3, 0F); // Box 34
pipModel[29].setRotationPoint(-10F, -12.5F, -1.5F);
pipModel[30].addBox(0F, 0F, 0F, 4, 3, 5, 0F); // Box 35
pipModel[30].setRotationPoint(-10F, -11.5F, -2.5F);
pipModel[31].addBox(0F, 0F, 0F, 4, 4, 4, 0F); // Box 36
pipModel[31].setRotationPoint(-10F, -12F, -2F);
pipModel[32].addBox(0F, 0F, 0F, 5, 3, 4, 0F); // Box 37
pipModel[32].setRotationPoint(10F, -11.5F, -2F);
pipModel[33].addBox(0F, 0F, 0F, 5, 4, 3, 0F); // Box 38
pipModel[33].setRotationPoint(10F, -12F, -1.5F);
pipModel[34].addBox(0F, 0F, 0F, 3, 4, 4, 0F); // Box 39
pipModel[34].setRotationPoint(2F, -12F, -2F);
pipModel[35].addBox(0F, 0F, 0F, 3, 1, 1, 0F); // Box 40
pipModel[35].setRotationPoint(-2F, -8F, -0.5F);
pipModel[36].addBox(0F, 0F, 0F, 3, 1, 1, 0F); // Box 41
pipModel[36].setRotationPoint(6F, -8F, -0.5F);
pipModel[37].addBox(0F, 0F, 0F, 2, 1, 2, 0F); // Box 42
pipModel[37].setRotationPoint(2.5F, -12.5F, -1F);
pipModel[38].addBox(0F, 0F, 0F, 3, 1, 3, 0F); // Box 43
pipModel[38].setRotationPoint(2F, -13.5F, -1.5F);
for(int i = 0; i < 39; i++)
{
pipModel[i].setTextureSize(textureX, textureY);
pipModel[i].mirror = true;
}
}
@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);
GL11.glDisable(GL11.GL_CULL_FACE);
for(int i = 0; i < 39; i++)
{
pipModel[i].render(f5);
}
GL11.glEnable(GL11.GL_CULL_FACE);
}
@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);
}
}

View File

@ -1,121 +0,0 @@
// Date: 20.01.2019 12:33:09
// 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 ModelRocket extends ModelBase {
// fields
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
ModelRenderer Shape6;
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape9;
public ModelRocket() {
textureWidth = 32;
textureHeight = 32;
Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 7, 2, 2);
Shape1.setRotationPoint(0F, -1F, -1F);
Shape1.setTextureSize(32, 32);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 0, 4);
Shape2.addBox(0F, 0F, 0F, 3, 1, 1);
Shape2.setRotationPoint(-3F, -0.5F, -0.5F);
Shape2.setTextureSize(32, 32);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape3 = new ModelRenderer(this, 8, 4);
Shape3.addBox(0F, 0F, 0F, 3, 1, 1);
Shape3.setRotationPoint(-3F, -0.5F, -0.5F);
Shape3.setTextureSize(32, 32);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0.1745329F, 0F);
Shape4 = new ModelRenderer(this, 0, 6);
Shape4.addBox(0F, 0F, -1F, 3, 1, 1);
Shape4.setRotationPoint(-3F, -0.5F, 0.5F);
Shape4.setTextureSize(32, 32);
Shape4.mirror = true;
setRotation(Shape4, 0F, -0.1745329F, 0F);
Shape5 = new ModelRenderer(this, 8, 6);
Shape5.addBox(0F, 0F, 0F, 3, 1, 1);
Shape5.setRotationPoint(-3F, -0.5F, -0.5F);
Shape5.setTextureSize(32, 32);
Shape5.mirror = true;
setRotation(Shape5, 0F, 0F, -0.1745329F);
Shape6 = new ModelRenderer(this, 0, 8);
Shape6.addBox(0F, -1F, 0F, 3, 1, 1);
Shape6.setRotationPoint(-3F, 0.5F, -0.5F);
Shape6.setTextureSize(32, 32);
Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0.1745329F);
Shape7 = new ModelRenderer(this, 0, 10);
Shape7.addBox(0F, 0F, 0F, 4, 4, 0);
Shape7.setRotationPoint(4F, 0F, 0F);
Shape7.setTextureSize(32, 32);
Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, -0.7853982F);
Shape8 = new ModelRenderer(this, 0, 14);
Shape8.addBox(0F, 0F, 0F, 4, 0, 4);
Shape8.setRotationPoint(4F, 0F, 0F);
Shape8.setTextureSize(32, 32);
Shape8.mirror = true;
setRotation(Shape8, 0F, 0.7853982F, 0F);
Shape9 = new ModelRenderer(this, 8, 8);
Shape9.addBox(0F, 0F, 0F, 1, 1, 1);
Shape9.setRotationPoint(7F, -0.5F, -0.5F);
Shape9.setTextureSize(32, 32);
Shape9.mirror = true;
setRotation(Shape9, 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);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.render(f5);
}
public void renderAll(float f5) {
Shape1.render(f5);
Shape2.render(f5);
Shape3.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape6.render(f5);
Shape7.render(f5);
Shape8.render(f5);
Shape9.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);
}
}

View File

@ -1,63 +0,0 @@
// Date: 20.07.2015 22:08:24
// 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 ModelRocketOld extends ModelBase {
// fields
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape9;
public ModelRocketOld() {
textureWidth = 64;
textureHeight = 32;
Shape7 = new ModelRenderer(this, 10, 0);
Shape7.addBox(0F, 0F, 0F, 1, 2, 2);
Shape7.setRotationPoint(-3F, -2F, -0.5F);
Shape7.setTextureSize(64, 32);
Shape7.mirror = true;
setRotation(Shape7, 0F, 0F, 0F);
Shape8 = new ModelRenderer(this, 0, 4);
Shape8.addBox(0F, 0F, 0F, 10, 1, 1);
Shape8.setRotationPoint(-8F, -1.5F, 0F);
Shape8.setTextureSize(64, 32);
Shape8.mirror = true;
setRotation(Shape8, 0F, 0F, 0F);
Shape9 = new ModelRenderer(this, 0, 0);
Shape9.addBox(0F, 0F, 0F, 3, 2, 2);
Shape9.setRotationPoint(-6.5F, -2F, -0.5F);
Shape9.setTextureSize(64, 32);
Shape9.mirror = true;
setRotation(Shape9, 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);
Shape7.render(f5);
Shape8.render(f5);
Shape9.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);
}
}

View File

@ -1,329 +0,0 @@
//This File was created with the Minecraft-SMP Modelling Toolbox 2.3.0.0
// Copyright (C) 2017 Minecraft-SMP.de
// This file is for Flan's Flying Mod Version 4.0.x+
// Model: TwiGun
// Model Creator:
// Created on: 01.11.2017 - 20:26:01
// Last changed on: 01.11.2017 - 20:26:01
package com.hbm.render.model; //Path where the model is located
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelTwiGun extends ModelBase //Same as Filename
{
int textureX = 128;
int textureY = 128;
ModelRenderer[] bodyModel;
public ModelTwiGun() //Same as Filename
{
textureWidth = 128;
textureHeight = 128;
bodyModel = new ModelRenderer[65];
bodyModel[0] = new ModelRenderer(this, 1, 1); // Rotor5
bodyModel[1] = new ModelRenderer(this, 17, 1); // Rotor4
bodyModel[2] = new ModelRenderer(this, 33, 1); // Rotor1
bodyModel[3] = new ModelRenderer(this, 49, 1); // Rotor6
bodyModel[4] = new ModelRenderer(this, 65, 1); // Rotor3
bodyModel[5] = new ModelRenderer(this, 81, 1); // Rotor2
bodyModel[6] = new ModelRenderer(this, 89, 1); // Box 8
bodyModel[7] = new ModelRenderer(this, 113, 1); // Box 9
bodyModel[8] = new ModelRenderer(this, 1, 9); // Box 10
bodyModel[9] = new ModelRenderer(this, 17, 9); // Box 11
bodyModel[10] = new ModelRenderer(this, 33, 9); // Box 12
bodyModel[11] = new ModelRenderer(this, 49, 9); // Box 13
bodyModel[12] = new ModelRenderer(this, 65, 9); // Box 14
bodyModel[13] = new ModelRenderer(this, 1, 17); // Box 15
bodyModel[14] = new ModelRenderer(this, 9, 17); // Box 16
bodyModel[15] = new ModelRenderer(this, 33, 17); // Box 17
bodyModel[16] = new ModelRenderer(this, 73, 9); // Box 18
bodyModel[17] = new ModelRenderer(this, 105, 9); // Box 19
bodyModel[18] = new ModelRenderer(this, 57, 17); // Box 20
bodyModel[19] = new ModelRenderer(this, 33, 17); // Box 21
bodyModel[20] = new ModelRenderer(this, 1, 25); // Box 22
bodyModel[21] = new ModelRenderer(this, 73, 17); // Box 23
bodyModel[22] = new ModelRenderer(this, 25, 33); // Box 24
bodyModel[23] = new ModelRenderer(this, 1, 25); // Box 25
bodyModel[24] = new ModelRenderer(this, 57, 33); // Box 26
bodyModel[25] = new ModelRenderer(this, 89, 33); // Box 27
bodyModel[26] = new ModelRenderer(this, 1, 49); // Box 28
bodyModel[27] = new ModelRenderer(this, 1, 49); // Box 29
bodyModel[28] = new ModelRenderer(this, 97, 17); // Box 30
bodyModel[29] = new ModelRenderer(this, 25, 49); // Box 31
bodyModel[30] = new ModelRenderer(this, 65, 49); // Box 32
bodyModel[31] = new ModelRenderer(this, 25, 57); // Box 33
bodyModel[32] = new ModelRenderer(this, 65, 57); // Box 34
bodyModel[33] = new ModelRenderer(this, 33, 65); // Box 35
bodyModel[34] = new ModelRenderer(this, 97, 49); // Box 36
bodyModel[35] = new ModelRenderer(this, 57, 25); // Box 37
bodyModel[36] = new ModelRenderer(this, 73, 65); // Box 38
bodyModel[37] = new ModelRenderer(this, 1, 73); // Box 40
bodyModel[38] = new ModelRenderer(this, 33, 73); // Box 41
bodyModel[39] = new ModelRenderer(this, 49, 73); // Box 42
bodyModel[40] = new ModelRenderer(this, 105, 57); // Box 43
bodyModel[41] = new ModelRenderer(this, 113, 65); // Box 44
bodyModel[42] = new ModelRenderer(this, 113, 25); // Box 45
bodyModel[43] = new ModelRenderer(this, 121, 9); // Box 46
bodyModel[44] = new ModelRenderer(this, 73, 73); // Box 47
bodyModel[45] = new ModelRenderer(this, 25, 73); // Box 48
bodyModel[46] = new ModelRenderer(this, 89, 73); // Box 49
bodyModel[47] = new ModelRenderer(this, 25, 25); // Box 50
bodyModel[48] = new ModelRenderer(this, 17, 9); // Box 51
bodyModel[49] = new ModelRenderer(this, 49, 33); // Box 52
bodyModel[50] = new ModelRenderer(this, 81, 33); // Box 53
bodyModel[51] = new ModelRenderer(this, 57, 1); // Box 54
bodyModel[52] = new ModelRenderer(this, 73, 1); // Box 55
bodyModel[53] = new ModelRenderer(this, 105, 73); // Box 56
bodyModel[54] = new ModelRenderer(this, 89, 73); // Box 57
bodyModel[55] = new ModelRenderer(this, 17, 81); // Box 58
bodyModel[56] = new ModelRenderer(this, 73, 81); // Box 59
bodyModel[57] = new ModelRenderer(this, 1, 89); // Box 60
bodyModel[58] = new ModelRenderer(this, 33, 89); // Box 61
bodyModel[59] = new ModelRenderer(this, 49, 41); // Box 63
bodyModel[60] = new ModelRenderer(this, 89, 81); // Box 64
bodyModel[61] = new ModelRenderer(this, 113, 81); // Box 65
bodyModel[62] = new ModelRenderer(this, 1, 89); // Box 66
bodyModel[63] = new ModelRenderer(this, 89, 89); // Box 67
bodyModel[64] = new ModelRenderer(this, 17, 97); // Box 68
bodyModel[0].addBox(0F, 1F, -1F, 3, 4, 2, 0F); // Rotor5
bodyModel[0].setRotationPoint(-12F, 0F, 0F);
bodyModel[1].addBox(0F, 1F, -1F, 3, 4, 2, 0F); // Rotor4
bodyModel[1].setRotationPoint(-12F, 0F, 0F);
bodyModel[1].rotateAngleX = 2.0943951F;
bodyModel[2].addBox(0F, 1F, -1F, 3, 4, 2, 0F); // Rotor1
bodyModel[2].setRotationPoint(-12F, 0F, 0F);
bodyModel[2].rotateAngleX = -2.0943951F;
bodyModel[3].addBox(0F, 4.5F, -0.5F, 3, 1, 1, 0F); // Rotor6
bodyModel[3].setRotationPoint(-12F, 0F, 0F);
bodyModel[4].addBox(0F, 4.5F, -0.5F, 3, 1, 1, 0F); // Rotor3
bodyModel[4].setRotationPoint(-12F, 0F, 0F);
bodyModel[4].rotateAngleX = 2.0943951F;
bodyModel[5].addBox(0F, 4.5F, -0.5F, 3, 1, 1, 0F); // Rotor2
bodyModel[5].setRotationPoint(-12F, 0F, 0F);
bodyModel[5].rotateAngleX = -2.0943951F;
bodyModel[6].addBox(0F, 0F, 0F, 5, 0, 8, 0F); // Box 8
bodyModel[6].setRotationPoint(-13F, -6F, -4F);
bodyModel[7].addBox(0F, -1F, -1F, 5, 2, 2, 0F); // Box 9
bodyModel[7].setRotationPoint(-13F, 0F, 0F);
bodyModel[8].addBox(0F, -1F, -1F, 5, 2, 2, 0F); // Box 10
bodyModel[8].setRotationPoint(-13F, 0F, 0F);
bodyModel[8].rotateAngleX = 0.78539816F;
bodyModel[9].addBox(0F, 0F, 0F, 5, 0, 5, 0F); // Box 11
bodyModel[9].setRotationPoint(-13F, -6F, 4F);
bodyModel[9].rotateAngleX = -0.78539816F;
bodyModel[10].addBox(0F, 0F, 0F, 9, 1, 1, 0F); // Box 12
bodyModel[10].setRotationPoint(-15F, -3F, 7F);
bodyModel[11].addBox(0F, 0F, -5F, 5, 0, 5, 0F); // Box 13
bodyModel[11].setRotationPoint(-13F, -6F, -4F);
bodyModel[11].rotateAngleX = 0.78539816F;
bodyModel[12].addBox(0F, 0F, 0F, 9, 1, 1, 0F); // Box 14
bodyModel[12].setRotationPoint(-15F, -3F, -8F);
bodyModel[13].addBox(0F, 0F, 0F, 5, 0, 7, 0F); // Box 15
bodyModel[13].setRotationPoint(-13F, 6.5F, -3.5F);
bodyModel[14].addBox(0F, 0F, 0F, 5, 0, 10, 0F); // Box 16
bodyModel[14].setRotationPoint(-13F, 6.5F, 3.5F);
bodyModel[14].rotateAngleX = 1.13446401F;
bodyModel[15].addBox(0F, 0F, -10F, 5, 0, 10, 0F); // Box 17
bodyModel[15].setRotationPoint(-13F, 6.5F, -3.5F);
bodyModel[15].rotateAngleX = -1.13446401F;
bodyModel[16].addBox(0F, 0F, 0F, 2, 2, 16, 0F); // Box 18
bodyModel[16].setRotationPoint(-15F, -2F, -8F);
bodyModel[17].addBox(0F, 0F, 0F, 3, 4, 4, 0F); // Box 19
bodyModel[17].setRotationPoint(-16F, -2F, -2F);
bodyModel[18].addBox(0F, 0F, 0F, 5, 1, 1, 0F); // Box 20
bodyModel[18].setRotationPoint(-13F, 6F, -0.5F);
bodyModel[19].addBox(0F, 0F, 0F, 2, 5, 2, 0F); // Box 21
bodyModel[19].setRotationPoint(-15F, 2F, -1F);
bodyModel[20].addBox(0F, 0F, 0F, 0, 10, 10, 0F); // Box 22
bodyModel[20].setRotationPoint(-13F, -5F, -5F);
bodyModel[21].addBox(0F, -1.5F, -1.5F, 3, 3, 3, 0F); // Box 23
bodyModel[21].setRotationPoint(-19F, 0F, 0F);
bodyModel[22].addBox(0F, -2F, -2F, 8, 4, 4, 0F); // Box 24
bodyModel[22].setRotationPoint(-27F, 0F, 0F);
bodyModel[23].addBox(0F, -1.5F, -1.5F, 3, 3, 3, 0F); // Box 25
bodyModel[23].setRotationPoint(-19F, 0F, 0F);
bodyModel[23].rotateAngleX = -0.78539816F;
bodyModel[24].addBox(0F, -2F, -2F, 8, 4, 4, 0F); // Box 26
bodyModel[24].setRotationPoint(-27F, 0F, 0F);
bodyModel[24].rotateAngleX = -0.78539816F;
bodyModel[25].addBox(0F, 0F, 0F, 14, 6, 4, 0F); // Box 27
bodyModel[25].setRotationPoint(-6F, -3F, -2F);
bodyModel[26].addBox(0F, 0F, 0F, 2, 2, 16, 0F); // Box 28
bodyModel[26].setRotationPoint(-8F, -2F, -8F);
bodyModel[27].addBox(0F, 0F, 0F, 3, 4, 4, 0F); // Box 29
bodyModel[27].setRotationPoint(-9F, -2F, -2F);
bodyModel[28].addBox(0F, 0F, 0F, 2, 5, 2, 0F); // Box 30
bodyModel[28].setRotationPoint(-8F, 2F, -1F);
bodyModel[29].addBox(0F, 0F, 0F, 14, 1, 5, 0F); // Box 31
bodyModel[29].setRotationPoint(-6F, -3F, 2F);
bodyModel[29].rotateAngleX = -0.26179939F;
bodyModel[30].addBox(0F, 0F, 0F, 14, 1, 1, 0F); // Box 32
bodyModel[30].setRotationPoint(-6F, -1.5F, 6F);
bodyModel[31].addBox(0F, -1F, 0F, 14, 1, 5, 0F); // Box 33
bodyModel[31].setRotationPoint(-6F, 1F, 2F);
bodyModel[31].rotateAngleX = 0.26179939F;
bodyModel[32].addBox(0F, -1F, -5F, 14, 1, 5, 0F); // Box 34
bodyModel[32].setRotationPoint(-6F, 1F, -2F);
bodyModel[32].rotateAngleX = -0.26179939F;
bodyModel[33].addBox(0F, 0F, -5F, 14, 1, 5, 0F); // Box 35
bodyModel[33].setRotationPoint(-6F, -3F, -2F);
bodyModel[33].rotateAngleX = 0.26179939F;
bodyModel[34].addBox(0F, 0F, 0F, 14, 1, 1, 0F); // Box 36
bodyModel[34].setRotationPoint(-6F, -1.5F, -7F);
bodyModel[35].addBox(0F, 0F, 0F, 5, 0, 4, 0F); // Box 37
bodyModel[35].setRotationPoint(-8F, -6F, -2F);
bodyModel[35].rotateAngleZ = 0.78539816F;
bodyModel[36].addBox(0F, 0F, 0F, 16, 4, 2, 0F); // Box 38
bodyModel[36].setRotationPoint(-6F, 3F, -1F);
bodyModel[37].addBox(0F, 0F, 0F, 6, 6, 6, 0F); // Box 40
bodyModel[37].setRotationPoint(8F, -3F, -3F);
bodyModel[38].addBox(0F, 0F, 0F, 3, 2, 10, 0F); // Box 41
bodyModel[38].setRotationPoint(8F, -2F, -5F);
bodyModel[39].addBox(0F, 0F, 0F, 4, 1, 13, 0F); // Box 42
bodyModel[39].setRotationPoint(8F, -1.5F, -6.5F);
bodyModel[40].addBox(0F, 0F, 0F, 8, 3, 3, 0F); // Box 43
bodyModel[40].setRotationPoint(14F, -1F, -1.5F);
bodyModel[41].addBox(0F, 0F, 0F, 1, 7, 3, 0F); // Box 44
bodyModel[41].setRotationPoint(22.5F, -1F, -1.5F);
bodyModel[42].addBox(0F, 0F, 0F, 4, 4, 3, 0F); // Box 45
bodyModel[42].setRotationPoint(18F, 2F, -1.5F);
bodyModel[43].addBox(0F, 0F, 0F, 2, 4, 1, 0F); // Box 46
bodyModel[43].setRotationPoint(13F, 2F, 0F);
bodyModel[44].addBox(0F, -5F, 0F, 2, 5, 3, 0F); // Box 47
bodyModel[44].setRotationPoint(18F, 6F, -1.5F);
bodyModel[44].rotateAngleZ = -0.43633231F;
bodyModel[45].addBox(0F, 0F, 0F, 6, 1, 2, 0F); // Box 48
bodyModel[45].setRotationPoint(10F, 6F, -1F);
bodyModel[46].addBox(0F, 0F, 0F, 3, 2, 2, 0F); // Box 49
bodyModel[46].setRotationPoint(14F, -3F, -1F);
bodyModel[46].rotateAngleZ = 0.78539816F;
bodyModel[47].addBox(0F, 0F, 0F, 2, 1, 5, 0F); // Box 50
bodyModel[47].setRotationPoint(14F, 0F, -2.5F);
bodyModel[48].addBox(0F, 0F, 0F, 1, 1, 1, 0F); // Box 51
bodyModel[48].setRotationPoint(10.5F, -3.5F, -0.5F);
bodyModel[49].addBox(0F, 0F, 0F, 3, 1, 1, 0F); // Box 52
bodyModel[49].setRotationPoint(9F, -3.5F, -2F);
bodyModel[50].addBox(0F, 0F, 0F, 3, 1, 1, 0F); // Box 53
bodyModel[50].setRotationPoint(10F, -3.5F, 1F);
bodyModel[51].addBox(0F, 0F, 0F, 1, 1, 3, 0F); // Box 54
bodyModel[51].setRotationPoint(9F, -3.5F, -1F);
bodyModel[52].addBox(0F, 0F, 0F, 1, 1, 3, 0F); // Box 55
bodyModel[52].setRotationPoint(12F, -3.5F, -2F);
bodyModel[53].addBox(0F, 0F, 0F, 1, 6, 2, 0F); // Box 56
bodyModel[53].setRotationPoint(22F, -0.5F, -1F);
bodyModel[54].addBox(0F, 0F, 0F, 0, 3, 12, 0F); // Box 57
bodyModel[54].setRotationPoint(-5F, -0.5F, -6F);
bodyModel[55].addBox(0F, 0F, 0F, 0, 3, 12, 0F); // Box 58
bodyModel[55].setRotationPoint(-4F, -0.5F, -6F);
bodyModel[56].addBox(0F, 0F, 0F, 0, 3, 12, 0F); // Box 59
bodyModel[56].setRotationPoint(-3F, -0.5F, -6F);
bodyModel[57].addBox(0F, 0F, 0F, 0, 3, 12, 0F); // Box 60
bodyModel[57].setRotationPoint(-2F, -0.5F, -6F);
bodyModel[58].addBox(0F, 0F, 0F, 0, 3, 12, 0F); // Box 61
bodyModel[58].setRotationPoint(-1F, -0.5F, -6F);
bodyModel[59].addBox(0F, 0F, 0F, 2, 1, 2, 0F); // Box 63
bodyModel[59].setRotationPoint(-4F, -3.5F, -1F);
bodyModel[60].addBox(0F, 0F, 0F, 2, 1, 2, 0F); // Box 64
bodyModel[60].setRotationPoint(-1F, -3.5F, -1F);
bodyModel[61].addBox(0F, 0F, 0F, 2, 1, 2, 0F); // Box 65
bodyModel[61].setRotationPoint(2F, -3.5F, -1F);
bodyModel[62].addBox(0F, 0F, 0F, 2, 1, 2, 0F); // Box 66
bodyModel[62].setRotationPoint(5F, -3.5F, -1F);
bodyModel[63].addBox(0F, 0F, 0F, 0, 3, 12, 0F); // Box 67
bodyModel[63].setRotationPoint(0F, -0.5F, -6F);
bodyModel[64].addBox(0F, 0F, 0F, 0, 3, 12, 0F); // Box 68
bodyModel[64].setRotationPoint(1F, -0.5F, -6F);
for(int i = 0; i < 65; i++)
{
bodyModel[i].setTextureSize(textureX, textureY);
bodyModel[i].mirror = true;
}
}
@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);
for(int i = 0; i < 65; i++)
{
bodyModel[i].render(f5);
}
}
@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);
}
}

View File

@ -7,6 +7,7 @@ import net.minecraft.client.audio.MovingSound;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
@Deprecated //wtf is this horseshit
public abstract class MovingSoundPlayerLoop extends MovingSound {
public static List<MovingSoundPlayerLoop> globalSoundList = new ArrayList<MovingSoundPlayerLoop>();

View File

@ -1,32 +0,0 @@
package com.hbm.sound;
import com.hbm.items.ModItems;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
public class MovingSoundXVL1456 extends MovingSoundPlayerLoop {
public MovingSoundXVL1456(ResourceLocation p_i45104_1_, Entity player, EnumHbmSound type) {
super(p_i45104_1_, player, type);
this.setPitch(0.5F);
}
@Override
public void update() {
super.update();
ItemStack i = null;
if(this.player != null) {
i = ((EntityPlayer)this.player).getItemInUse();
}
//this.setPitch(this.getPitch() + 0.1F);
if(i == null || (i != null && i.getItem() != ModItems.gun_xvl1456) || !((EntityPlayer)this.player).isSneaking() || ((EntityPlayer)this.player).getItemInUseDuration() <= 0)
this.stop();
}
}

View File

@ -4,7 +4,6 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
import com.hbm.inventory.material.Mats;
import com.hbm.itempool.ItemPool;
import com.hbm.itempool.ItemPoolsPile;
import com.hbm.items.ModItems;
@ -12,7 +11,6 @@ import com.hbm.items.special.ItemBookLore;
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@ -46,12 +44,9 @@ public class LootGenerator {
else
loot.addItem(new ItemStack(ModItems.ammo_rocket), -0.25, 0, -0.25);
for(int i = 0; i < 4; i++)
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.cap_nuka, 2), 0.125, i * 0.03125, 0.25);
for(int i = 0; i < 2; i++)
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.syringe_metal_stimpak, 1), -0.25, i * 0.03125, 0.25);
for(int i = 0; i < 6; i++)
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.cap_nuka, 2), 0.125, i * 0.03125, -0.25);
for(int i = 0; i < 4; i++) addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.cap_nuka, 2), 0.125, i * 0.03125, 0.25);
for(int i = 0; i < 2; i++) addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.syringe_metal_stimpak, 1), -0.25, i * 0.03125, 0.25);
for(int i = 0; i < 6; i++) addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.cap_nuka, 2), 0.125, i * 0.03125, -0.25);
}
}
@ -61,15 +56,8 @@ public class LootGenerator {
if(loot != null && loot.items.isEmpty()) {
for(int i = 0; i < 4; i++) {
int type = world.rand.nextInt(4);
Item syringe = type < 2 ? ModItems.syringe_metal_stimpak : type == 2 ? ModItems.syringe_metal_medx : ModItems.syringe_metal_psycho;
addItemWithDeviation(loot, world.rand, new ItemStack(syringe), 0.125, i * 0.03125, 0.25);
}
int type = world.rand.nextInt(8);
Item syringe = type < 2 ? ModItems.radaway : type < 4 ? ModItems.radx : type < 7 ? ModItems.iv_blood : ModItems.siox;
addItemWithDeviation(loot, world.rand, new ItemStack(syringe), -0.25, 0, -0.125);
for(int i = 0; i < 4; i++) addItemWithDeviation(loot, world.rand, ItemPool.getStack(ItemPoolsPile.POOL_PILE_MED_SYRINGE, world.rand), 0.125, i * 0.03125, 0.25);
addItemWithDeviation(loot, world.rand, ItemPool.getStack(ItemPoolsPile.POOL_PILE_MED_PILLS, world.rand), -0.25, 0, -0.125);
}
}
@ -84,7 +72,7 @@ public class LootGenerator {
int count = world.rand.nextInt(5) + 3;
for(int k = 0; k < count; k++) {
addItemWithDeviation(loot, world.rand, ItemPool.getStack(ItemPool.getPool(ItemPoolsPile.POOL_PILE_CAPS), world.rand), i * 0.3125, k * 0.03125, j * 0.3125);
addItemWithDeviation(loot, world.rand, ItemPool.getStack(ItemPoolsPile.POOL_PILE_CAPS, world.rand), i * 0.3125, k * 0.03125, j * 0.3125);
}
}
}
@ -98,20 +86,15 @@ public class LootGenerator {
if(loot != null && loot.items.isEmpty()) {
boolean r = world.rand.nextBoolean();
if(r)
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.gun_lever_action), 0.125, 0.025, 0.25);
if(r) addItemWithDeviation(loot, world.rand, ItemPool.getStack(ItemPoolsPile.POOL_PILE_MAKESHIFT_GUN, world.rand), 0.125, 0.025, 0.25);
if(!r || world.rand.nextBoolean())
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.wrench), -0.25, 0, -0.28125);
if(!r || world.rand.nextBoolean()) addItemWithDeviation(loot, world.rand, ItemPool.getStack(ItemPoolsPile.POOL_PILE_MAKESHIFT_WRENCH, world.rand), -0.25, 0, -0.28125);
int count = world.rand.nextInt(2) + 1;
for(int i = 0; i < count; i++) {
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.plate_steel), -0.25, i * 0.03125, 0.3125);
}
for(int i = 0; i < count; i++) addItemWithDeviation(loot, world.rand, ItemPool.getStack(ItemPoolsPile.POOL_PILE_MAKESHIFT_PLATES, world.rand), -0.25, i * 0.03125, 0.3125);
count = world.rand.nextInt(2) + 2;
for(int i = 0; i < count; i++)
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.wire_fine, 1, Mats.MAT_ALUMINIUM.id), 0.25, i * 0.03125, 0.1875);
for(int i = 0; i < count; i++) addItemWithDeviation(loot, world.rand, ItemPool.getStack(ItemPoolsPile.POOL_PILE_MAKESHIFT_WIRE, world.rand), 0.25, i * 0.03125, 0.1875);
}
}
@ -121,15 +104,11 @@ public class LootGenerator {
if(loot != null && loot.items.isEmpty()) {
boolean memes = world.rand.nextInt(10) == 0;
for(int i = 0; i < 4; i++) {
for(int j = 0; j < 4; j++) {
if(world.rand.nextBoolean() || memes) {
int type = world.rand.nextInt(11);
AmmoFatman nuke = memes ? AmmoFatman.PUMPKIN : type == 0 ? AmmoFatman.STOCK : type <= 5 ? AmmoFatman.LOW : AmmoFatman.SAFE;
loot.addItem(ModItems.ammo_nuke.stackFromEnum(nuke), -0.375 + i * 0.25, 0, -0.375 + j * 0.25);
if(world.rand.nextBoolean()) {
loot.addItem(ItemPool.getStack(ItemPoolsPile.POOL_PILE_NUKE_STORAGE, world.rand), -0.375 + i * 0.25, 0, -0.375 + j * 0.25);
}
}
}
@ -170,12 +149,10 @@ public class LootGenerator {
addItemWithDeviation(loot, world.rand, book, 0, 0, -0.25);
int count = world.rand.nextInt(3) + 2;
for(int k = 0; k < count; k++)
addItemWithDeviation(loot, world.rand, new ItemStack(Items.book), -0.25, k * 0.03125, 0.25);
for(int k = 0; k < count; k++) addItemWithDeviation(loot, world.rand, new ItemStack(Items.book), -0.25, k * 0.03125, 0.25);
count = world.rand.nextInt(2) + 1;
for(int k = 0; k < count; k++)
addItemWithDeviation(loot, world.rand, new ItemStack(Items.paper), 0.25, k * 0.03125, 0.125);
for(int k = 0; k < count; k++) addItemWithDeviation(loot, world.rand, new ItemStack(Items.paper), 0.25, k * 0.03125, 0.125);
}
}

View File

@ -675,6 +675,7 @@ chem.XENON=Linde Xenon Cycle
chem.XENON_OXY=Boosted Linde Xenon Cycle
chem.YELLOWCAKE=Yellowcake Production
commands.satellite.no_active_satellites=No active satellites found!
commands.satellite.no_satellite=No satellite using this frequency found!
commands.satellite.not_a_satellite=The held item is not a satellite!
commands.satellite.satellite_descended=Satellite successfully descended.

View File

@ -1,5 +1,4 @@
{
"misc.nullTau": {"category": "player", "sounds": [{"name": "misc/null", "stream": false}]},
"misc.nullChopper": {"category": "player", "sounds": [{"name": "misc/null", "stream": false}]},
"misc.nullCrashing": {"category": "player", "sounds": [{"name": "misc/null", "stream": false}]},
"misc.nullMine": {"category": "player", "sounds": [{"name": "misc/null", "stream": false}]},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB