Schematic to place around entity

Started by Blowmeaway2814 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Schematic to place around entity

I am trying to make a gun that when it fire, and hits an enetity, it places a schematic. How would I do this in mcreator?

Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actcually easy job.Go eventns
Tue, 01/26/2016 - 21:51

Actcually easy job.Go eventns of gun click place schematic and test it works i do it it worked like walla!

Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Actcually easy job.Go eventns
Wed, 01/27/2016 - 06:06

@#2 Ive done that but then I shoot the gun, and it places the schematic right in front of me, and it also can be placed in the air so I was wondering if there was a way to do so without that happening, or is there a simpler way like when I shoot the gun, the enemy becomes encased in ice?

Joined Sep 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:Actcually easy job.Go eventns
Sat, 01/30/2016 - 08:39

Edit source code, change your pos to entity pos

Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:Actcually easy job.Go eventns
Sat, 01/30/2016 - 17:33

@#3 how would i edit the source code to do this?

 

Joined Sep 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:Actcually easy job.Go eventns
Sun, 01/31/2016 - 13:25

@#3.1 send me your gun source code i will add it in.

 

Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:RE:Actcually easy job.Go eventns
Sun, 01/31/2016 - 16:08

@#3.1.1 

package mod.mcreator;//based on master condiguration

import cpw.mods.fml.client.*;
import cpw.mods.fml.client.registry.*;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.asm.*;
import cpw.mods.fml.common.asm.transformers.*;
import cpw.mods.fml.common.discovery.*;
import cpw.mods.fml.common.discovery.asm.*;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.functions.*;
import cpw.mods.fml.common.network.*;
import cpw.mods.fml.common.registry.*;
import cpw.mods.fml.common.toposort.*;
import cpw.mods.fml.common.versioning.*;
import cpw.mods.fml.relauncher.*;
import cpw.mods.fml.server.*;
import net.minecraft.block.*;
import net.minecraft.block.material.*;
import net.minecraft.client.*;
import net.minecraft.client.audio.*;
import net.minecraft.client.entity.*;
import net.minecraft.client.gui.*;
import net.minecraft.client.gui.achievement.*;
import net.minecraft.client.gui.inventory.*;
import net.minecraft.client.model.*;
import net.minecraft.client.multiplayer.*;
import net.minecraft.client.particle.*;
import net.minecraft.client.renderer.*;
import net.minecraft.client.renderer.culling.*;
import net.minecraft.client.renderer.entity.*;
import net.minecraft.client.renderer.tileentity.*;
import net.minecraft.client.settings.*;
import net.minecraft.command.*;
import net.minecraft.crash.*;
import net.minecraft.creativetab.*;
import net.minecraft.dispenser.*;
import net.minecraft.enchantment.*;
import net.minecraft.entity.*;
import net.minecraft.entity.ai.*;
import net.minecraft.entity.boss.*;
import net.minecraft.entity.effect.*;
import net.minecraft.entity.item.*;
import net.minecraft.entity.monster.*;
import net.minecraft.entity.passive.*;
import net.minecraft.entity.player.*;
import net.minecraft.entity.projectile.*;
import net.minecraft.inventory.*;
import net.minecraft.item.*;
import net.minecraft.item.crafting.*;
import net.minecraft.nbt.*;
import net.minecraft.network.*;
import net.minecraft.network.rcon.*;
import net.minecraft.pathfinding.*;
import net.minecraft.potion.*;
import net.minecraft.profiler.*;
import net.minecraft.server.*;
import net.minecraft.server.dedicated.*;
import net.minecraft.server.gui.*;
import net.minecraft.server.integrated.*;
import net.minecraft.server.management.*;
import net.minecraft.src.*;
import net.minecraft.stats.*;
import net.minecraft.tileentity.*;
import net.minecraft.util.*;
import net.minecraft.village.*;
import net.minecraft.world.*;
import net.minecraft.world.biome.*;
import net.minecraft.world.chunk.*;
import net.minecraft.world.chunk.storage.*;
import net.minecraft.world.demo.*;
import net.minecraft.world.gen.*;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.layer.*;
import net.minecraft.world.gen.structure.*;
import net.minecraft.world.storage.*;
import net.minecraftforge.classloading.*;
import net.minecraftforge.client.*;
import net.minecraftforge.client.event.*;
import net.minecraftforge.client.event.sound.*;
import net.minecraftforge.common.*;
import net.minecraftforge.event.*;
import net.minecraftforge.event.entity.*;
import net.minecraftforge.event.entity.item.*;
import net.minecraftforge.event.entity.living.*;
import net.minecraftforge.event.entity.minecart.*;
import net.minecraftforge.event.entity.player.*;
import net.minecraftforge.event.terraingen.*;
import net.minecraftforge.event.world.*;
import net.minecraftforge.oredict.*;
import net.minecraftforge.transformers.*;
import net.minecraft.init.*;
import java.util.*;

public class mcreator_absoluteZeroAperture {

public mcreator_absoluteZeroAperture(){}

public static Item block;
public static Object instance;

public void load(){

GameRegistry.addRecipe(new ItemStack(block, 1), new Object[]{
    "012", "345", "678", Character.valueOf('0'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('1'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('2'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('3'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('4'), new ItemStack(Blocks.packed_ice, 1), Character.valueOf('5'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('6'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('7'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('8'), new ItemStack(mcreator_cryogenicMaterial.block, 1), 
});
}

public void registerRenderers(){}
public void generateNether(World world, Random random, int chunkX, int chunkZ){}
public void generateSurface(World world, Random random, int chunkX, int chunkZ){}
public int addFuel(ItemStack fuel){
    return 0;
}
public void serverLoad(FMLServerStartingEvent event){}
public void preInit(FMLPreInitializationEvent event){}

static{
block = (new ItemgGUN());
Item.itemRegistry.addObject(428, "absoluteZeroAperture", block);
}

static class ItemgGUN extends Item{

public ItemgGUN(){
super();
setMaxDamage(100);
maxStackSize = 1;
setFull3D();
setUnlocalizedName("absoluteZeroAperture");
setTextureName("Aperture");
setCreativeTab(CreativeTabs.tabCombat);
}

public int getMaxItemUseDuration(ItemStack par1ItemStack)
    {
        return 72000;
    }

   public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, final EntityPlayer par3EntityPlayer){

        boolean flag = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0;

        if (flag || par3EntityPlayer.inventory.hasItem(Items.snowball))
        {
            float f = 1.5F;

            EntityArrow entityarrow = new EntityArrow(par2World, par3EntityPlayer, f * 2.0F)
            {

                public void onCollideWithPlayer(EntityPlayer entity){
                    super.onCollideWithPlayer(entity);
                    int i = MathHelper.floor_double(this.boundingBox.minX + 0.001D);
                    int j = MathHelper.floor_double(this.boundingBox.minY + 0.001D);
                    int k = MathHelper.floor_double(this.boundingBox.minZ + 0.001D);
                    World world = this.worldObj;
                    
if(true){
boolean place = true;

if(place){
world.setBlock(i+3, j+0, k+0, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+0, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+1, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+1, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+1, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+1, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+0, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+7, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+0, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+7, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+0, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+7, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+7, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+7, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+7, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+7, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+1, k+1, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+1, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+1, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+1, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+1, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+1, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+1, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+1, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+1, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+1, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+1, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+1, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+1, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+1, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+1, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+1, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+1, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+1, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+2, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+2, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+2, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+2, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+2, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+2, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+3, k+4, Block.getBlockById(174), 0, 2);
}
}

                }

                public void onUpdate(){
                     super.onUpdate();
                     int i = MathHelper.floor_double(this.boundingBox.minX + 0.001D);
                     int j = MathHelper.floor_double(this.boundingBox.minY + 0.001D);
                     int k = MathHelper.floor_double(this.boundingBox.minZ + 0.001D);
                     World world = this.worldObj;
                     Entity entity = (Entity)par3EntityPlayer;
                     
                     if (this.worldObj.getBlock(i, j, k) != Blocks.air || this.worldObj.getBlock(i, j-1, k) != Blocks.air ||
                     this.worldObj.getBlock(i, j+1, k) != Blocks.air ||
                     this.worldObj.getBlock(i+1, j, k) != Blocks.air || this.worldObj.getBlock(i-1, j, k) != Blocks.air
                     || this.worldObj.getBlock(i, j, k+1) != Blocks.air || this.worldObj.getBlock(i, j, k-1) != Blocks.air){
                           
if(true){
world.setBlockToAir(i, j, k);
}

if(true){
world.setBlock(i, j, k, Blocks.packed_ice, 0, 2);
}

                           this.kill();
                     }

                }

                };

                entityarrow.setIsCritical(true);
                entityarrow.setDamage(1.0);
                entityarrow.setKnockbackStrength(1);

                if(false){
                    entityarrow.setFire(100);
                }

                par1ItemStack.damageItem(1, par3EntityPlayer);
                par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);

            if (flag)
            {
                entityarrow.canBePickedUp = 2;
            }
            else
            {
                par3EntityPlayer.inventory.consumeInventoryItem(Items.snowball);
            }

            if (!par2World.isRemote)
            {
                par2World.spawnEntityInWorld(entityarrow);
            }
            World world = par2World;
            EntityPlayer entity = par3EntityPlayer;
            int i = (int)entity.posX;
            int j = (int)entity.posY;
            int k = (int)entity.posZ;
            
        }

        return par1ItemStack;
    }

 

    /**
     * returns the action that specifies what animation to play when the items is being used
     */
    public EnumAction getItemUseAction(ItemStack par1ItemStack)
    {
        return EnumAction.bow;
    }


}}

Joined Sep 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
package mod.mcreator.Main;/
Mon, 02/01/2016 - 07:28

package mod.mcreator.Main;//based on master condiguration

import net.minecraft.block.*;
import net.minecraft.block.material.*;
import net.minecraft.client.*;
import net.minecraft.client.audio.*;
import net.minecraft.client.entity.*;
import net.minecraft.client.gui.*;
import net.minecraft.client.gui.achievement.*;
import net.minecraft.client.gui.inventory.*;
import net.minecraft.client.model.*;
import net.minecraft.client.multiplayer.*;
import net.minecraft.client.particle.*;
import net.minecraft.client.renderer.*;
import net.minecraft.client.renderer.culling.*;
import net.minecraft.client.renderer.entity.*;
import net.minecraft.client.renderer.tileentity.*;
import net.minecraft.client.settings.*;
import net.minecraft.command.*;
import net.minecraft.crash.*;
import net.minecraft.creativetab.*;
import net.minecraft.dispenser.*;
import net.minecraft.enchantment.*;
import net.minecraft.entity.*;
import net.minecraft.entity.ai.*;
import net.minecraft.entity.boss.*;
import net.minecraft.entity.effect.*;
import net.minecraft.entity.item.*;
import net.minecraft.entity.monster.*;
import net.minecraft.entity.passive.*;
import net.minecraft.entity.player.*;
import net.minecraft.entity.projectile.*;
import net.minecraft.inventory.*;
import net.minecraft.item.*;
import net.minecraft.item.crafting.*;
import net.minecraft.nbt.*;
import net.minecraft.network.*;
import net.minecraft.network.rcon.*;
import net.minecraft.pathfinding.*;
import net.minecraft.potion.*;
import net.minecraft.profiler.*;
import net.minecraft.server.*;
import net.minecraft.server.dedicated.*;
import net.minecraft.server.gui.*;
import net.minecraft.server.integrated.*;
import net.minecraft.server.management.*;
import net.minecraft.stats.*;
import net.minecraft.tileentity.*;
import net.minecraft.util.*;
import net.minecraft.village.*;
import net.minecraft.world.*;
import net.minecraft.world.biome.*;
import net.minecraft.world.chunk.*;
import net.minecraft.world.chunk.storage.*;
import net.minecraft.world.demo.*;
import net.minecraft.world.gen.*;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.layer.*;
import net.minecraft.world.gen.structure.*;
import net.minecraft.world.storage.*;
import net.minecraftforge.classloading.*;
import net.minecraftforge.client.*;
import net.minecraftforge.client.event.*;
import net.minecraftforge.client.event.sound.*;
import net.minecraftforge.common.*;
import net.minecraftforge.event.*;
import net.minecraftforge.event.entity.*;
import net.minecraftforge.event.entity.item.*;
import net.minecraftforge.event.entity.living.*;
import net.minecraftforge.event.entity.minecart.*;
import net.minecraftforge.event.entity.player.*;
import net.minecraftforge.event.terraingen.*;
import net.minecraftforge.event.world.*;
import net.minecraftforge.oredict.*;
import net.minecraft.init.*;
import java.util.*;

public class mcreator_absoluteZeroAperture {

public mcreator_absoluteZeroAperture(){}

public static Item block;
public static Object instance;

public void load(){

GameRegistry.addRecipe(new ItemStack(block, 1), new Object[]{
    "012", "345", "678", Character.valueOf('0'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('1'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('2'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('3'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('4'), new ItemStack(Blocks.packed_ice, 1), Character.valueOf('5'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('6'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('7'), new ItemStack(mcreator_cryogenicMaterial.block, 1), Character.valueOf('8'), new ItemStack(mcreator_cryogenicMaterial.block, 1), 
});
}

public void registerRenderers(){}
public void generateNether(World world, Random random, int chunkX, int chunkZ){}
public void generateSurface(World world, Random random, int chunkX, int chunkZ){}
public int addFuel(ItemStack fuel){
    return 0;
}
public void serverLoad(FMLServerStartingEvent event){}
public void preInit(FMLPreInitializationEvent event){}

static{
block = (new ItemgGUN());
Item.itemRegistry.addObject(428, "absoluteZeroAperture", block);
}

static class ItemgGUN extends Item{

public ItemgGUN(){
super();
setMaxDamage(100);
maxStackSize = 1;
setFull3D();
setUnlocalizedName("absoluteZeroAperture");
setTextureName("Aperture");
setCreativeTab(CreativeTabs.tabCombat);
}

public int getMaxItemUseDuration(ItemStack par1ItemStack)
    {
        return 72000;
    }

   public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, final EntityPlayer par3EntityPlayer){

        boolean flag = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0;

        if (flag || par3EntityPlayer.inventory.hasItem(Items.snowball))
        {
            float f = 1.5F;

            EntityArrow entityarrow = new EntityArrow(par2World, par3EntityPlayer, f * 2.0F)
            {

                public void onCollideWithPlayer(EntityPlayer entity){
                    super.onCollideWithPlayer(entity);
                    int i = MathHelper.floor_double(entity.boundingBox.minX + 0.001D);
                    int j = MathHelper.floor_double(entity.boundingBox.minY + 0.001D);
                    int k = MathHelper.floor_double(entity.boundingBox.minZ + 0.001D);
                    World world = this.worldObj;
                    
if(true){
boolean place = true;

if(place){
world.setBlock(i+3, j+0, k+0, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+0, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+1, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+1, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+1, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+1, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+0, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+0, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+7, j+0, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+0, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+7, j+0, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+0, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+7, j+0, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+0, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+0, k+7, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+0, k+7, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+0, k+7, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+0, k+7, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+1, k+1, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+1, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+1, k+2, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+1, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+1, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+1, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+1, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+1, j+1, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+1, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+1, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+1, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+6, j+1, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+2, j+1, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+1, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+1, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+1, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+1, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+1, k+6, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+2, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+2, k+3, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+2, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+2, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+5, j+2, k+4, Block.getBlockById(174), 0, 2);
world.setBlock(i+3, j+2, k+5, Block.getBlockById(174), 0, 2);
world.setBlock(i+4, j+3, k+4, Block.getBlockById(174), 0, 2);
}
}

                }
                protected void onImpact(MovingObjectPosition p_70184_1_)
                {                
                    for (int j = 0; j < 8; ++j)
                    {    
                        if(true){
                            this.getEntityWorld().setBlock(this.posX, this.posY, this.posZ, Blocks.packed_ice, 0, 2);
                            this.getEntityWorld().setBlock(this.posX, this.posY+1, this.posZ, Blocks.packed_ice, 0, 2);
                            }
                    }

                    if (!this.worldObj.isRemote)
                    {
                        this.setDead();
                    }
                
                }
                public void onUpdate(){
                     super.onUpdate();
                     int i = MathHelper.floor_double(this.boundingBox.minX + 0.001D);
                     int j = MathHelper.floor_double(this.boundingBox.minY + 0.001D);
                     int k = MathHelper.floor_double(this.boundingBox.minZ + 0.001D);
                     World world = this.worldObj;
                     Entity entity = (Entity)par3EntityPlayer;
                     
                     if (this.worldObj.getBlock(i, j, k) != Blocks.air || this.worldObj.getBlock(i, j-1, k) != Blocks.air ||
                     this.worldObj.getBlock(i, j+1, k) != Blocks.air ||
                     this.worldObj.getBlock(i+1, j, k) != Blocks.air || this.worldObj.getBlock(i-1, j, k) != Blocks.air
                     || this.worldObj.getBlock(i, j, k+1) != Blocks.air || this.worldObj.getBlock(i, j, k-1) != Blocks.air){
                           
if(true){
world.setBlockToAir(i, j, k);
}

if(true){
world.setBlock(i, j, k, Blocks.packed_ice, 0, 2);
}

                           this.kill();
                     }

                }

                };

                entityarrow.setIsCritical(true);
                entityarrow.setDamage(1.0);
                entityarrow.setKnockbackStrength(1);

                if(false){
                    entityarrow.setFire(100);
                }

                par1ItemStack.damageItem(1, par3EntityPlayer);
                par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);

            if (flag)
            {
                entityarrow.canBePickedUp = 2;
            }
            else
            {
                par3EntityPlayer.inventory.consumeInventoryItem(Items.snowball);
            }

            if (!par2World.isRemote)
            {
                par2World.spawnEntityInWorld(entityarrow);
            }
            World world = par2World;
            EntityPlayer entity = par3EntityPlayer;
            int i = (int)entity.posX;
            int j = (int)entity.posY;
            int k = (int)entity.posZ;
            
        }

        return par1ItemStack;
    }

 

    /**
     * returns the action that specifies what animation to play when the items is being used
     */
    public EnumAction getItemUseAction(ItemStack par1ItemStack)
    {
        return EnumAction.bow;
    }


}}

 

 

 

 

you use minecraft 1.7 so i wont know if my code work for you

Joined Sep 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also if you edit element
Mon, 02/01/2016 - 07:31

Also if you edit element again code will reset to default carefull

Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Also if you edit element
Mon, 02/01/2016 - 14:31

@#5 do you think you could also help me figure out how to add a custom armor model?

Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:package mod.mcreator.Main;/
Tue, 02/02/2016 - 00:11

@#4 Also the code didn't work sadly