Jump to content

Recommended Posts

Posted

I set out to make a blaster gun using and I used EntityArrow as a starting point to make a blaster "bolt"  .. .the arrow/bolt will not render properly at all, it seems to shoot backward and then appear but it's invisible in flight.  When it does render it is at all shapes and sizes and angles.

 

Anyone know why my texture would not render in place of the vanilla texture I really did not change much in the vanilla code for any of these classes because I cannot even get it to work to begin with 

 

I am still a long way from making a blaster gun

 

Weird video effect link (sorry I could not get it to embed here):

 

package com.glistre.glistremod.projectiles.blaster;

import com.glistre.glistremod.GlistreMod;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Items;
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;

import com.glistre.glistremod.projectiles.blaster.*;

public class Blaster extends Item{
private String texturePath = (GlistreMod.MODID + ":" + "blasterGun_1");
   public Blaster(int par1) {
       super();
       this.setFull3D();
       
   }
    /**
     * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
     */
   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);
        if (event.isCanceled())
        {
            return;
        }
        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(GlistreMod.blasterbolt_1))
        {
            float f = (float)j / 20.0F;
            f = (f * f + f * 2.0F) / 3.0F;

            if ((double)f < 0.1D)
            {
                return;
            }

            if (f > 1.0F)
            {
                f = 1.0F;
            }

            EntityBlasterBolt par1EntityBlasterBolt = new EntityBlasterBolt(p_77615_2_, p_77615_3_, f * 2.0F);

            if (f == 1.0F)
            {
                par1EntityBlasterBolt.setIsCritical(true);
            }

            int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, p_77615_1_);

            if (k > 0)
            {
                par1EntityBlasterBolt.setDamage(par1EntityBlasterBolt.getDamage() + (double)k * 0.5D + 0.5D);
            }

            int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, p_77615_1_);

            if (l > 0)
            {
                par1EntityBlasterBolt.setKnockbackStrength(l);
            }

            if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, p_77615_1_) > 0)
            {
                par1EntityBlasterBolt.setFire(100);
            }

            p_77615_1_.damageItem(1, p_77615_3_);
            p_77615_2_.playSoundAtEntity(p_77615_3_, "fireworks.blast", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);

            if (flag)
            {
                par1EntityBlasterBolt.canBePickedUp = 2;
            }
            else
            {
                p_77615_3_.inventory.consumeInventoryItem(GlistreMod.blasterbolt_1);
            }

            if (!p_77615_2_.isRemote)
            {
                p_77615_2_.spawnEntityInWorld(par1EntityBlasterBolt);
            }
        }
    }

    /**
     * returns the action that specifies what animation to play when the items is being used
     */
    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, if you're in Survivor mode you 
     * have to have an arrow in inventory
     */
    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;
        }

        if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(GlistreMod.blasterbolt_1))
        {
            p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
        }

        return p_77659_1_;
        
    }

        
    public void onUsingItemTick(ItemStack stack, EntityPlayer player, int count)
    {
       this.setDamage(stack, 99999 - count);
    }	       
    /**
     * How long it takes to use or consume an item
     */
    public int getMaxItemUseDuration(ItemStack par1ItemStack)
    {
        return 72000;
    }

   

   @Override   
   @SideOnly(Side.CLIENT)

       public void registerIcons(IIconRegister iconRegister)
       {
           this.itemIcon = iconRegister.registerIcon(texturePath);
       }	   

} 


 

entityblasterbolt :

 

package com.glistre.glistremod.projectiles.blaster;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

import java.util.List;

import com.glistre.glistremod.GlistreMod;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.IProjectile;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.play.server.S2BPacketChangeGameState;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;

public class EntityBlasterBolt extends Entity implements IProjectile
{
    private int field_145791_d = -1;
    private int field_145792_e = -1;
    private int field_145789_f = -1;
    private Block field_145790_g;
    private int inData;
    private boolean inGround;
    /** 1 if the player can pick up the arrow */
    public int canBePickedUp;
    /** Seems to be some sort of timer for animating an arrow. */
    public int arrowShake;
    /** The owner of this arrow. */
    public Entity shootingEntity;
    private int ticksInGround;
    private int ticksInAir;
    private double damage = 2.0D;
    /** The amount of knockback an arrow applies when it hits a mob. */
    private int knockbackStrength;
//    private static final String __OBFID = "CL_00001715";

    public EntityBlasterBolt(World p_i1753_1_)
    {
        super(p_i1753_1_);
        this.renderDistanceWeight = 10.0D;
        this.setSize(0.5F, 0.5F);
    }

    public EntityBlasterBolt(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_)
    {
        super(p_i1754_1_);
        this.renderDistanceWeight = 10.0D;
        this.setSize(0.5F, 0.5F);
        this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_);
        this.yOffset = 0.0F;
    }

    public EntityBlasterBolt(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_)
    {
        super(p_i1755_1_);
        this.renderDistanceWeight = 10.0D;
        this.shootingEntity = p_i1755_2_;

        if (p_i1755_2_ instanceof EntityPlayer)
        {
            this.canBePickedUp = 1;
        }

        this.posY = p_i1755_2_.posY + (double)p_i1755_2_.getEyeHeight() - 0.10000000149011612D;
        double d0 = p_i1755_3_.posX - p_i1755_2_.posX;
        double d1 = p_i1755_3_.boundingBox.minY + (double)(p_i1755_3_.height / 3.0F) - this.posY;
        double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ;
        double d3 = (double)MathHelper.sqrt_double(d0 * d0 + d2 * d2);

        if (d3 >= 1.0E-7D)
        {
            float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
            float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI));
            double d4 = d0 / d3;
            double d5 = d2 / d3;
            this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3);
            this.yOffset = 0.0F;
            float f4 = (float)d3 * 0.2F;
            this.setThrowableHeading(d0, d1 + (double)f4, d2, p_i1755_4_, p_i1755_5_);
        }
    }

    public EntityBlasterBolt(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_)
    {
        super(p_i1756_1_);
        this.renderDistanceWeight = 10.0D;
        this.shootingEntity = p_i1756_2_;

        if (p_i1756_2_ instanceof EntityPlayer)
        {
            this.canBePickedUp = 1;
        }

        this.setSize(0.5F, 0.5F);
        this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + (double)p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch);
        this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
        this.posY -= 0.10000000149011612D;
        this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
        this.setPosition(this.posX, this.posY, this.posZ);
        this.yOffset = 0.0F;
        this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
        this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
        this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI));
        this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F);
    }

    protected void entityInit()
    {
        this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
    }

    /**
     * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
     */
    public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_)
    {
        float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_);
        p_70186_1_ /= (double)f2;
        p_70186_3_ /= (double)f2;
        p_70186_5_ /= (double)f2;
        p_70186_1_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_;
        p_70186_3_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_;
        p_70186_5_ += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)p_70186_8_;
        p_70186_1_ *= (double)p_70186_7_;
        p_70186_3_ *= (double)p_70186_7_;
        p_70186_5_ *= (double)p_70186_7_;
        this.motionX = p_70186_1_;
        this.motionY = p_70186_3_;
        this.motionZ = p_70186_5_;
        float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_);
        this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI);
        this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, (double)f3) * 180.0D / Math.PI);
        this.ticksInGround = 0;
    }

    /**
     * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX,
     * posY, posZ, yaw, pitch
     */
   @SideOnly(Side.CLIENT)
    public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_)
    {
        this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_);
        this.setRotation(p_70056_7_, p_70056_8_);
    }

    /**
     * Sets the velocity to the args. Args: x, y, z
     */
    @SideOnly(Side.CLIENT)
    public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)
    {
        this.motionX = p_70016_1_;
        this.motionY = p_70016_3_;
        this.motionZ = p_70016_5_;

        if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
        {
            float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_);
            this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI);
            this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, (double)f) * 180.0D / Math.PI);
            this.prevRotationPitch = this.rotationPitch;
            this.prevRotationYaw = this.rotationYaw;
            this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
            this.ticksInGround = 0;
        }
    }

    /**
     * Called to update the entity's position/logic.
     */
    public void onUpdate()
    {
        super.onUpdate();

        if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
        {
            float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
            this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
            this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI);
        }

        Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);

        if (block.getMaterial() != Material.air)
        {
            block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
            AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);

            if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))
            {
                this.inGround = true;
            }
        }

        if (this.arrowShake > 0)
        {
            --this.arrowShake;
        }

        if (this.inGround)
        {
            int j = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);

            if (block == this.field_145790_g && j == this.inData)
            {
                ++this.ticksInGround;

                if (this.ticksInGround == 1200)
                {
                    this.setDead();
                }
            }
            else
            {
                this.inGround = false;
                this.motionX *= (double)(this.rand.nextFloat() * 0.2F);
                this.motionY *= (double)(this.rand.nextFloat() * 0.2F);
                this.motionZ *= (double)(this.rand.nextFloat() * 0.2F);
                this.ticksInGround = 0;
                this.ticksInAir = 0;
            }
        }
        else
        {
            ++this.ticksInAir;
            Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
            Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
            MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
            vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
            vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);

            if (movingobjectposition != null)
            {
                vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
            }

            Entity entity = null;
            List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
            double d0 = 0.0D;
            int i;
            float f1;

            for (i = 0; i < list.size(); ++i)
            {
                Entity entity1 = (Entity)list.get(i);

                if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5))
                {
                    f1 = 0.3F;
                    AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double)f1, (double)f1, (double)f1);
                    MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);

                    if (movingobjectposition1 != null)
                    {
                        double d1 = vec31.distanceTo(movingobjectposition1.hitVec);

                        if (d1 < d0 || d0 == 0.0D)
                        {
                            entity = entity1;
                            d0 = d1;
                        }
                    }
                }
            }

            if (entity != null)
            {
                movingobjectposition = new MovingObjectPosition(entity);
            }

            if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer)
            {
                EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit;

                if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer))
                {
                    movingobjectposition = null;
                }
            }

            float f2;
            float f4;

            if (movingobjectposition != null)
            {
                if (movingobjectposition.entityHit != null)
                {
                    f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
                    int k = MathHelper.ceiling_double_int((double)f2 * this.damage);

                    if (this.getIsCritical())
                    {
                        k += this.rand.nextInt(k / 2 + 2);
                    }

                    DamageSource damagesource = null;

                    if (this.shootingEntity == null)
                    {
                        damagesource = DamageSource.causeThrownDamage(this, this);
                    }
                    else
                    {
                        damagesource = DamageSource.causeThrownDamage(this, this.shootingEntity);
                    }

                    if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman))
                    {
                        movingobjectposition.entityHit.setFire(5);
                    }

                    if (movingobjectposition.entityHit.attackEntityFrom(damagesource, (float)k))
                    {
                        if (movingobjectposition.entityHit instanceof EntityLivingBase)
                        {
                            EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit;

                            if (!this.worldObj.isRemote)
                            {
                                entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEntity() + 1);
                            }

                            if (this.knockbackStrength > 0)
                            {
                                f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);

                                if (f4 > 0.0F)
                                {
                                    movingobjectposition.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4);
                                }
                            }

                            if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase)
                            {
                                EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity);
                                EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase);
                            }

                            if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP)
                            {
                                ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F));
                            }
                        }

                        this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));

                        if (!(movingobjectposition.entityHit instanceof EntityEnderman))
                        {
                            this.setDead();
                        }
                    }
                    else
                    {
                        this.motionX *= -0.10000000149011612D;
                        this.motionY *= -0.10000000149011612D;
                        this.motionZ *= -0.10000000149011612D;
                        this.rotationYaw += 180.0F;
                        this.prevRotationYaw += 180.0F;
                        this.ticksInAir = 0;
                    }
                }
                else
                {
                    this.field_145791_d = movingobjectposition.blockX;
                    this.field_145792_e = movingobjectposition.blockY;
                    this.field_145789_f = movingobjectposition.blockZ;
                    this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
                    this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
                    this.motionX = (double)((float)(movingobjectposition.hitVec.xCoord - this.posX));
                    this.motionY = (double)((float)(movingobjectposition.hitVec.yCoord - this.posY));
                    this.motionZ = (double)((float)(movingobjectposition.hitVec.zCoord - this.posZ));
                    f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
                    this.posX -= this.motionX / (double)f2 * 0.05000000074505806D;
                    this.posY -= this.motionY / (double)f2 * 0.05000000074505806D;
                    this.posZ -= this.motionZ / (double)f2 * 0.05000000074505806D;
                    this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
                    this.inGround = true;
                    this.arrowShake = 7;
                    this.setIsCritical(false);

                    if (this.field_145790_g.getMaterial() != Material.air)
                    {
                        this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this);
                    }
                }
            }

            if (this.getIsCritical())
            {
                for (i = 0; i < 4; ++i)
                {
                    this.worldObj.spawnParticle("crit", this.posX + this.motionX * (double)i / 4.0D, this.posY + this.motionY * (double)i / 4.0D, this.posZ + this.motionZ * (double)i / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ);
                }
            }

            this.posX += this.motionX;
            this.posY += this.motionY;
            this.posZ += this.motionZ;
            f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
            this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);

            for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
            {
                ;
            }

            while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
            {
                this.prevRotationPitch += 360.0F;
            }

            while (this.rotationYaw - this.prevRotationYaw < -180.0F)
            {
                this.prevRotationYaw -= 360.0F;
            }

            while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
            {
                this.prevRotationYaw += 360.0F;
            }

            this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
            this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
            float f3 = 0.99F;
            f1 = 0.05F;

            if (this.isInWater())
            {
                for (int l = 0; l < 4; ++l)
                {
                    f4 = 0.25F;
                    this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ);
                }

                f3 = 0.8F;
            }

            if (this.isWet())
            {
                this.extinguish();
            }

            this.motionX *= (double)f3;
            this.motionY *= (double)f3;
            this.motionZ *= (double)f3;
            this.motionY -= (double)f1;
            this.setPosition(this.posX, this.posY, this.posZ);
            this.func_145775_I();
        }
    }

    /**
     * (abstract) Protected helper method to write subclass entity data to NBT.
     */
    public void writeEntityToNBT(NBTTagCompound p_70014_1_)
    {
        p_70014_1_.setShort("xTile", (short)this.field_145791_d);
        p_70014_1_.setShort("yTile", (short)this.field_145792_e);
        p_70014_1_.setShort("zTile", (short)this.field_145789_f);
        p_70014_1_.setShort("life", (short)this.ticksInGround);
        p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g));
        p_70014_1_.setByte("inData", (byte)this.inData);
        p_70014_1_.setByte("shake", (byte)this.arrowShake);
        p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0));
        p_70014_1_.setByte("pickup", (byte)this.canBePickedUp);
        p_70014_1_.setDouble("damage", this.damage);
    }

    /**
     * (abstract) Protected helper method to read subclass entity data from NBT.
     */
    public void readEntityFromNBT(NBTTagCompound p_70037_1_)
    {
        this.field_145791_d = p_70037_1_.getShort("xTile");
        this.field_145792_e = p_70037_1_.getShort("yTile");
        this.field_145789_f = p_70037_1_.getShort("zTile");
        this.ticksInGround = p_70037_1_.getShort("life");
        this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255);
        this.inData = p_70037_1_.getByte("inData") & 255;
        this.arrowShake = p_70037_1_.getByte("shake") & 255;
        this.inGround = p_70037_1_.getByte("inGround") == 1;

        if (p_70037_1_.hasKey("damage", 99))
        {
            this.damage = p_70037_1_.getDouble("damage");
        }

        if (p_70037_1_.hasKey("pickup", 99))
        {
            this.canBePickedUp = p_70037_1_.getByte("pickup");
        }
        else if (p_70037_1_.hasKey("player", 99))
        {
            this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0;
        }
    }

    /**
     * Called by a player entity when they collide with an entity
     */
    public void onCollideWithPlayer(EntityPlayer p_70100_1_)
    {
        if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0)
        {
            boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;

            if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(GlistreMod.blasterbolt_1, 1)))
            {
                flag = false;
            }

            if (flag)
            {
                this.playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
                p_70100_1_.onItemPickup(this, 1);
                this.setDead();
            }
        }
    }

    /**
     * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
     * prevent them from trampling crops
     */
    protected boolean canTriggerWalking()
    {
        return false;
    }

    @SideOnly(Side.CLIENT)
    public float getShadowSize()
    {
        return 0.0F;
    }

    public void setDamage(double p_70239_1_)
    {
        this.damage = p_70239_1_;
    }

    public double getDamage()
    {
        return this.damage;
    }

    /**
     * Sets the amount of knockback the arrow applies when it hits a mob.
     */
    public void setKnockbackStrength(int p_70240_1_)
    {
        this.knockbackStrength = p_70240_1_;
    }

    /**
     * If returns false, the item will not inflict any damage against entities.
     */
    public boolean canAttackWithItem()
    {
        return false;
    }

    /**
     * Whether the arrow has a stream of critical hit particles flying behind it.
     */
    public void setIsCritical(boolean p_70243_1_)
    {
        byte b0 = this.dataWatcher.getWatchableObjectByte(16);

        if (p_70243_1_)
        {
            this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1)));
        }
        else
        {
            this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2)));
        }
    }

    /**
     * Whether the arrow has a stream of critical hit particles flying behind it.
     */
    public boolean getIsCritical()
    {
        byte b0 = this.dataWatcher.getWatchableObjectByte(16);
        return (b0 & 1) != 0;
    }
}

 

my render class:


package com.glistre.glistremod.projectiles.blaster;

import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.init.Items;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.relauncher.Side;

import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;

import cpw.mods.fml.relauncher.SideOnly;

import com.glistre.glistremod.GlistreMod;
import com.glistre.glistremod.projectiles.blaster.EntityBlasterBolt;

@SideOnly(Side.CLIENT)
public class RendreBlast extends Render
{



    private static final ResourceLocation blastTextures = new ResourceLocation("glistremod:" +"/items/blasterboltentity_1.png");

public void doRender(EntityBlasterBolt par1EntityBlasterBolt, double par2, double par4, double par6, float par8, float par9)
    {
//        this.loadTexture("/GlistreMod/blast.png");
    	this.bindEntityTexture(par1EntityBlasterBolt);
    	GL11.glPushMatrix();
        GL11.glTranslatef((float)par2, (float)par4, (float)par6);
        GL11.glRotatef(par1EntityBlasterBolt.prevRotationYaw + (par1EntityBlasterBolt.rotationYaw - par1EntityBlasterBolt.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(par1EntityBlasterBolt.prevRotationPitch + (par1EntityBlasterBolt.rotationPitch - par1EntityBlasterBolt.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F);
        Tessellator var10 = Tessellator.instance;
        byte var11 = 0;
        float var12 = 0.0F;
        float var13 = 0.5F;
        float var14 = (float)(0 + var11 * 10) / 32.0F;
        float var15 = (float)(5 + var11 * 10) / 32.0F;
        float var16 = 0.0F;
        float var17 = 0.15625F;
        float var18 = (float)(5 + var11 * 10) / 32.0F;
        float var19 = (float)(10 + var11 * 10) / 32.0F;
        float var20 = 0.05625F;
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        float var21 = (float)par1EntityBlasterBolt.arrowShake - par9;

        if (var21 > 0.0F)
        {
            float var22 = -MathHelper.sin(var21 * 3.0F) * var21;
            GL11.glRotatef(var22, 0.0F, 0.0F, 1.0F);
        }

        GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
        GL11.glScalef(var20, var20, var20);
        GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
        GL11.glNormal3f(var20, 0.0F, 0.0F);
        var10.startDrawingQuads();
        var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)var16, (double)var18);
        var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)var17, (double)var18);
        var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)var17, (double)var19);
        var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)var16, (double)var19);
        var10.draw();
        GL11.glNormal3f(-var20, 0.0F, 0.0F);
        var10.startDrawingQuads();
        var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)var16, (double)var18);
        var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)var17, (double)var18);
        var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)var17, (double)var19);
        var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)var16, (double)var19);
        var10.draw();

        for (int var23 = 0; var23 < 4; ++var23)
        {
            GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
            GL11.glNormal3f(0.0F, 0.0F, var20);
            var10.startDrawingQuads();
            var10.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double)var12, (double)var14);
            var10.addVertexWithUV(8.0D, -2.0D, 0.0D, (double)var13, (double)var14);
            var10.addVertexWithUV(8.0D, 2.0D, 0.0D, (double)var13, (double)var15);
            var10.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double)var12, (double)var15);
            var10.draw();
        }

        GL11.glDisable(GL12.GL_RESCALE_NORMAL);
        GL11.glPopMatrix();
    }

    /**
     * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
     * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
     * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
     * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
     */
    public void doRender(Entity par1EntityBlasterBolt, double par2, double par4, double par6, float par8, float par9)
    {
//        this.doRender((EntityBlasterBolt)par1Entity, par2, par4, par6, par8, par9);
          this.doRender((EntityBlasterBolt)par1EntityBlasterBolt, par2, par4, par6, par8, par9);
    }
  


@Override
public ResourceLocation getEntityTexture(Entity p_110775_1_) {
	// TODO Auto-generated method stub
	return new ResourceLocation("/GlistreMod/blasterbolt_1.png");
//		return this.getEntityTexture((EntityBlasterBolt) p_110775_1_);
}
protected ResourceLocation getEntityTexture(EntityBlasterBolt p_110775_1_){
	return blastTextures;
}


}

 

I put this in my client proxy:

package com.glistre.glistremod;

import java.awt.Color;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import cpw.mods.fml.client.registry.RenderingRegistry;

import com.glistre.glistremod.CommonProxy;


import com.glistre.glistremod.projectiles.blaster.EntityBlasterBolt;
import com.glistre.glistremod.projectiles.blaster.RendreBlast;

import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.registry.EntityRegistry;


public class ClientProxy extends CommonProxy {


@Override
public void registerRendering(){


        RenderingRegistry.registerEntityRenderingHandler(EntityBlasterBolt.class, new RendreBlast());

   


           

}

}

 

and my main class:

       
                public static Item blaster_1;
        public int blaster1ID;
// the ray or blast bolt like an arrow
        public static Item blasterbolt_1;
        public int blasterbolt_1ID;
@EventHandler	
public void preInit( FMLPreInitializationEvent event) {



FMLCommonHandler.instance().bus().register(handler);
MinecraftForge.EVENT_BUS.register(handler);

proxy.registerRendering();

blaster_1 = new Blaster(blaster1ID).setUnlocalizedName("blaster_1").setCreativeTab(GlistreTab_1).setTextureName(MODID + ":"  + "blasterGun_1");
        GameRegistry.registerItem(blaster_1, blaster_1.getUnlocalizedName());       
        blasterbolt_1 = new MyProjectile2(blasterbolt_1ID, "blasterbolt_1").setUnlocalizedName("blasterbolt_1").setCreativeTab(GlistreTab_1);
        EntityRegistry.registerModEntity(EntityBlasterBolt.class, "blasterbolt_1", blasterbolt_1ID, this, 64, 20, false);

 

ideas / suggestions/ help?

 

 

Posted

Hi

I'm using version 1.8 but I'm sure things are similar:

1.) Create new entity class extending EntityThrowable

2.) Register the entity in your pre-Init using EntityRegistry

3.) In your item class that you want to spawn the entity from, get an instance of the world and use par2World.spawnEntityInWorld(world, entityLivingBase);

4.) Use whatever model / texture you need

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Posted

Yeah, thanks, I was trying to mod off the arrow and bow instead of the throwable/snowball.  I have another blaster and it works fine with snowball or throwable.  Cannot get the arrow to render properly

Posted

Have you taken a peek at the vanilla arrow? Also, is your custom arrow different from the vanilla arrow? I hope you get this working soon as I know how frustrating it can be to get the code working!

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Posted

I'm sorry, I also would like to add that in your EntityBlasterBolt class, I think you can extend something like EntityProjectile (I might be remembering incorrectly, I would check but I don't have my project ATM). Hope that helps!

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • If you're shopping from Germany, France, Italy, Switzerland, or anywhere else in Europe, the acw696499 Temu coupon code offers maximum benefits tailored just for you. Whether you're a new customer or a returning one, you can take advantage of incredible savings. Get ready to grab amazing deals with the Temu coupon 100€ off and the Temu 100 off coupon code—your go-to discount code for unbeatable offers on quality products. What Is The Coupon Code For Temu 100€ Off? You’ll be thrilled to know that both new and existing Temu customers can enjoy the perks of the Temu coupon 100€ off just by applying a special code. This incredible 100€ off Temu coupon is designed to help European users save big across various categories on the Temu website and app. Here’s how the code acw696499 brings value: acw696499 – Flat 100€ off your entire purchase, no strings attached. acw696499 – Unlock a 100€ coupon pack for multiple uses on different categories. acw696499 – Get a flat 100€ discount exclusively tailored for new customers in Europe. acw696499 – Extra 100€ promo code for existing customers who shop regularly. acw696499 – Exclusive 100€ coupon only for European users on Temu. Temu Coupon Code 100€ Off For New Users In 2025 New to Temu? You're in for a treat! Apply our exclusive code to enjoy the Temu coupon 100€ off and kickstart your shopping journey with major savings. The Temu coupon code 100€ off is perfect for first-time users across Europe, delivering instant value: acw696499 – Flat 100€ discount exclusively for new users across all product categories. acw696499 – Receive a 100€ coupon bundle that can be used across multiple orders. acw696499 – Enjoy up to 100€ in coupons to use repeatedly throughout your first month. acw696499 – Get free shipping across European Nations like Germany, France, Italy, and Switzerland. acw696499 – An extra 30% off on any purchase for first-time users in Europe. How To Redeem The Temu coupon 100€ off For New Customers? Using the Temu 100€ coupon is quick and easy. Here’s how you can apply the Temu 100€ off coupon code for new users: Download the Temu app or visit the Temu website. Sign up using your email or social login credentials. Browse your favourite products and add them to your cart. At checkout, enter the code acw696499 in the coupon field. The discount will be automatically applied—enjoy your savings! Temu Coupon 100€ Off For Existing Customers Already a loyal Temu shopper? Great news—our code offers exciting benefits for you too. Use the Temu 100€ coupon codes for existing users and enjoy Temu coupon 100€ off for existing customers free shipping across Europe. Here’s how acw696499 benefits returning users: acw696499 – Get a 100€ extra discount exclusively for existing Temu customers. acw696499 – Unlock a 100€ coupon bundle valid for multiple purchases across categories. acw696499 – Receive a free gift with express shipping anywhere in Europe. acw696499 – Stack up to 70% off on top of your current discounts. acw696499 – Free shipping for returning customers in Germany, France, Italy, Spain, Switzerland, and more. How To Use The Temu Coupon Code 100€ Off For Existing Customers? Here’s how existing users can use the Temu coupon code 100€ off and enjoy all the perks from the Temu coupon 100€ off code: Open the Temu app or website and log in to your existing account. Add your favorite products to your shopping bag. Head to checkout and look for the promo code section. Enter acw696499 and click apply. Enjoy your 100€ discount plus free shipping and other offers! Latest Temu Coupon 100€ Off First Order Your first purchase on Temu should be memorable—and affordable! With the Temu coupon code 100€ off first order, you can unlock unbeatable savings. Whether you're looking for fashion, electronics, home goods, or anything in between, the Temu coupon code first order and Temu coupon code 100€ off first time user offer unbeatable value: acw696499 – Flat 100€ discount for your very first Temu order. acw696499 – Claim a 100€ Temu coupon code when checking out your first cart. acw696499 – Redeem up to 100€ worth of coupons for multiple uses on first orders. acw696499 – Free shipping to countries like Germany, France, Italy, Switzerland, and beyond. acw696499 – Extra 30% off on top of the 100€ discount for first-time users. How To Find The Temu Coupon Code 100€ Off? Wondering where to locate the latest and best Temu coupon 100€ off offers? Or looking for trusted sources like Temu coupon 100€ off Reddit? You can subscribe to the Temu newsletter for verified coupons delivered directly to your inbox. Also, check Temu’s official Instagram, Facebook, and Twitter pages for real-time promo codes and seasonal offers. To simplify the process, visit reputable coupon-sharing websites like ours where we consistently test and update all valid codes. Is Temu 100€ Off Coupon Legit? Yes, it absolutely is! The Temu 100€ Off Coupon Legit tag applies 100% to our verified code. Our Temu 100 off coupon legit option, acw696499, is fully functional and accepted on both the app and website. It’s been verified across multiple European regions and continues to deliver consistent results. There’s no expiration, and it works seamlessly every time. How Does Temu 100€ Off Coupon Work? The Temu coupon code 100€ off first-time user and Temu coupon codes 100 off work by applying a promotional code during checkout that deducts 100€ from your total. Once you enter acw696499 at the coupon section, the discount is immediately applied to eligible products. This offer applies whether you are new to Temu or an existing customer. You also receive perks like free delivery, additional discounts, and access to exclusive promo bundles. How To Earn Temu 100€ Coupons As A New Customer? To get access to the Temu coupon code 100€ off and 100 off Temu coupon code, all you need to do is register as a new user and use our code. Temu automatically applies your eligibility to a welcome coupon bundle that includes €100 worth of savings, plus free shipping and exclusive discounts. By entering acw696499, you're also enrolled into future promotional offers. What Are The Advantages Of Using Temu Coupon €100 Off? Here's why using the Temu coupon code 100 off and Temu coupon code 100€ off is a no-brainer: €100 discount on your first order. €100 coupon bundle for multiple uses. 70% discount on trending items. Extra 30% off for existing Temu Europe customers. Up to 90% off on selected items in special sales. Free gift for new European users. Free delivery all over Europe. Temu €100 Discount Code And Free Gift For New And Existing Customers Our Temu 100€ off coupon code and 100€ off Temu coupon code don't just provide a big discount—they also come with surprise gifts and exclusive savings. Here's what you get with acw696499: acw696499 – Flat €100 discount for your first order. acw696499 – Extra 30% off on any product category. acw696499 – Free gift just for new Temu users. acw696499 – Up to 70% discount on popular items in the Temu app. acw696499 – Free gift + free shipping to Germany, France, Italy, Switzerland, and more. Pros And Cons Of Using Temu Coupon Code €100 Off This Month Here are some important pros and cons of the Temu coupon 100€ off code and Temu 100 off coupon: Pros: Massive €100 savings for all users. Valid for both new and returning customers. No expiration date—use anytime. Works on almost every category. Free shipping to European nations. Cons: Limited to one use per account per week. May not apply on certain flash sale items. Terms And Conditions Of Using The Temu Coupon €100 Off In 2025 To ensure a smooth experience, keep these Temu coupon code 100€ off free shipping and latest Temu coupon code 100€ off terms in mind: No expiration date—use whenever you shop. Valid for both new and existing Temu users. Redeemable across European Nations like Germany, France, Italy, Switzerland, and Spain. No minimum purchase required. Code acw696499 must be manually entered at checkout. Final Note: Use The Latest Temu Coupon Code 100€ Off Save big with the Temu coupon code €100 off and make your 2025 shopping more affordable than ever. Using our Temu coupon €100 off, you get exclusive benefits not found elsewhere—including discounts, gifts, and free delivery. FAQs Of Temu 100€ Off Coupon Can I use the €100 Temu coupon more than once? Yes, the coupon pack can be used across multiple purchases, especially when you redeem acw696499 for bundle savings.  Is the Temu 100€ coupon valid for all European countries? Absolutely! It works in Germany, France, Italy, Switzerland, Spain, and other EU countries.  Do I need a minimum order to use the coupon? No minimum purchase is required to apply the Temu 100€ off coupon—just enter acw696499 and shop freely. Can I combine this €100 coupon with other offers? Forks! You can stack this with seasonal deals, flash sales, and even referral discounts. Where can I find the latest €100 coupon code for Temu? The best way is to bookmark our site and use verified codes like acw696499 that we test regularly for all users.
    • In July 2025, the acw696499 Temu coupon code is giving customers across the USA, Canada, and Europe the best bang for their buck. If you’ve never shopped on Temu before, now’s the perfect time to grab incredible deals using this unbeatable promo. This summer, make sure you don’t miss out on the hottest offers like the Temu coupon $100 off and the Temu 100 off coupon code—they’re real, tested, and delivering serious value. What Is The Coupon Code For Temu $100 Off? Yes, both new and existing users can unlock massive savings using our Temu coupon $100 off code. Whether you're shopping for fashion, electronics, or home goods, our $100 off Temu coupon is your gateway to premium deals on the Temu app and website. Here’s how the acw696499 coupon code benefits you: acw696499 – Gives a flat $100 off instantly on your purchase, no gimmicks. acw696499 – Unlocks a $100 coupon pack that you can use across multiple transactions. acw696499 – Grants new customers a special $100 flat discount as a welcome gift. acw696499 – Offers an additional $100 promo code advantage for existing loyal Temu users. acw696499 – Designed especially for shoppers in the USA and Canada to enjoy a full $100 off. Temu Coupon Code $100 Off For New Users In 2025 If you’re new to Temu, welcome aboard—you're in for a treat! By applying our Temu coupon $100 off, you get a major head start on your shopping journey. Here’s how the Temu coupon code $100 off and acw696499 can benefit you as a new customer: acw696499 – Enjoy a flat $100 discount the moment you sign up and shop. acw696499 – Receive a complete $100 coupon bundle curated just for new users. acw696499 – Use up to $100 in coupon value across multiple purchases for ultimate flexibility. acw696499 – Get free shipping to over 68 countries, no strings attached. acw696499 – Benefit from an extra 30% off on your entire first purchase, boosting your total savings. How To Redeem The Temu Coupon $100 Off For New Customers? Want to redeem the Temu $100 coupon fast? Here’s your quick and easy guide to using the Temu $100 off coupon code for new users: Download the Temu app or visit the Temu website. Sign up using your email or phone number to create a new account. Add your favorite items to the cart. At checkout, enter the promo code acw696499. Hit "Apply" to see your total drop with the $100 discount. Enjoy your savings and free delivery! Temu Coupon $100 Off For Existing Customers Even if you've shopped at Temu before, don’t worry—we’ve got amazing deals for you too. With our Temu $100 coupon codes for existing users, long-time Temu fans can also benefit from generous savings and perks. Here’s how Temu coupon $100 off for existing customers free shipping and the acw696499 code can work for you: acw696499 – Get an additional $100 off, even if you've used Temu before. acw696499 – Unlock a $100 coupon bundle tailored for repeat buyers. acw696499 – Receive free express shipping plus a surprise gift in your package. acw696499 – Add an extra 30% off discount stacked on current promotions. acw696499 – Free shipping to 68 countries, including the USA and Canada. How To Use The Temu Coupon Code $100 Off For Existing Customers? Ready to save again? Here’s how existing users can apply the Temu coupon code $100 off and claim the Temu coupon $100 off code: Log in to your Temu account on the app or website. Select your desired items and go to your shopping cart. Type acw696499 into the promo code box. Apply the coupon to see the $100 discount reflected instantly. Complete your purchase with free shipping and extra perks. Latest Temu Coupon $100 Off First Order Want to make your first order even more special? With our Temu coupon code $100 off first order, you're setting yourself up for serious savings. Here’s what you’ll get using Temu coupon code first order, Temu coupon code $100 off first time user, and acw696499: acw696499 – Instantly take $100 off your first Temu order. acw696499 – Activate a $100 Temu coupon code the moment you sign up. acw696499 – Enjoy up to $100 in discounts that can be split across several purchases. acw696499 – Free delivery to over 68 global destinations. acw696499 – Stack a bonus 30% off on any first-time purchase. How To Find The Temu Coupon Code $100 Off? If you’re wondering where to find the Temu coupon $100 off, you’re not alone. In fact, there’s even a growing community searching for Temu coupon $100 off Reddit discussions to spot the latest working codes. Here’s how to stay updated: Sign up for the Temu newsletter to receive verified coupons straight to your inbox. Follow Temu’s official social media accounts for daily flash deals and promos. Bookmark trusted coupon websites (like ours!) to find tested and valid codes including acw696499. Is Temu $100 Off Coupon Legit? You might be wondering, is the Temu $100 Off Coupon Legit? Absolutely! Our Temu 100 off coupon legit and verified code acw696499 is 100% real and regularly tested. You can use this coupon confidently on both your first and repeat orders. Plus, it works worldwide, has no expiration date, and continues to provide exceptional value to customers everywhere. How Does Temu $100 Off Coupon Work? The Temu coupon code $100 off first-time user is a special promotion available through trusted partners like us. You simply enter our Temu coupon codes 100 off during checkout, and Temu applies the discount instantly to your total bill. This promotion can be used for both individual and bundled purchases. It’s valid for multiple transactions, depending on how your discount pack is split. Whether you’re shopping for clothing, gadgets, beauty, or kitchenware—your $100 savings start the moment you enter the code. How To Earn Temu $100 Coupons As A New Customer? The easiest way to get the Temu coupon code $100 off and activate your 100 off Temu coupon code is to sign up as a new customer on Temu. From there, use the acw696499 code on your first order. You’ll automatically unlock bonus discounts and receive up to $100 in coupon value across several transactions. Make sure to complete your purchase through the app or official website to apply the code successfully. What Are The Advantages Of Using The Temu Coupon $100 Off? Using the Temu coupon code 100 off and the Temu coupon code $100 off comes with multiple exciting perks: A $100 discount on your first order A $100 coupon bundle for use on multiple purchases Up to 70% off on popular Temu items An extra 30% off for existing users Up to 90% off on selected items during sales Free surprise gift for new users Free delivery to 68 countries including the USA, UK, and Canada Temu $100 Discount Code And Free Gift For New And Existing Customers If you’re still not convinced, here’s more. With the Temu $100 off coupon code and $100 off Temu coupon code, you also get exciting free gifts with every order! Use acw696499 and enjoy: acw696499 – A $100 discount on your first Temu order. acw696499 – An additional 30% off on your favorite item. acw696499 – A free surprise gift for new customers. acw696499 – Up to 70% off on hot-selling items on the app. acw696499 – Free shipping + gift combo in 68 countries, including the USA and UK. Pros And Cons Of Using The Temu Coupon Code $100 Off This Month Thinking about redeeming the Temu coupon $100 off code? Here are the upsides and a couple of minor downsides of using the Temu 100 off coupon this month: Pros: Works for both new and existing users Up to $100 in instant savings Free international shipping Valid worldwide with no expiry Stacks with other offers and promo discounts Cons: Only available through select partners (like us) May not work on some heavily discounted items Terms And Conditions Of Using The Temu Coupon $100 Off In 2025 Before you shop, be sure to check these terms for the Temu coupon code $100 off free shipping and the latest Temu coupon code $100 off: No expiration date; the code acw696499 can be used anytime Valid in over 68 countries for both new and existing users No minimum purchase requirement to use the coupon Works exclusively on the Temu app and official website One user can use multiple coupon packs from the bundle Final Note: Use The Latest Temu Coupon Code $100 Off If you’re serious about saving, now is the time to redeem the Temu coupon code $100 off on your first or next purchase. You’ll love the deals, the convenience, and the excitement of shopping with major discounts. Don’t let the opportunity pass to claim your Temu coupon $100 off before July ends. Go ahead, enter the code, and let the savings begin. FAQs Of Temu $100 Off Coupon What is the Temu $100 off coupon code for July 2025? The official coupon code is acw696499, and it gives you $100 off your purchase—valid for both new and existing users.  Can I use the Temu coupon $100 off more than once? Yes! The coupon comes with a bundle that lets you use parts of the discount over several purchases.  Is the Temu 100 off coupon legit and verified? Absolutely. The acw696499 code is 100% legit, tested, and works globally on the Temu app and site.  Do I need a minimum order amount to use the $100 off Temu coupon? No minimum purchase is required. The discount applies immediately once you use the code.  Can I stack the Temu coupon code with other offers? Yes! You can stack acw696499 with other discounts, sales, and seasonal promos for maximum savings.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.