Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.8] Particles how i do to spam this block particles in this specific pos in t?


perromercenary00
 Share

Recommended Posts

good nigths

 

i need to spam particles from diferent blocks when i use a custom item on them  soo when i rigth click oak wood it spawns oak particles, but when i rigth click stone it spawn stone particles,

http://jabelarminecraft.blogspot.com/p/minecraft-forge-1721710-modding-tips.html

im using this guide but icould'n make it  work error

 

"The constructor EntityParticleEmitter(World, float, double, float, double, double, double) is undefined"

 

and

¿ who is lex

 

What is Lex's full nick name?:

 

 

 

thanks

Link to comment
Share on other sites

in reality im using the code from that  guide in internet that is for 1.7 but has to change something to meet mi needs

 

 

//##################################################################3
void particulas(World worldIn, BlockPos pos){ 

//if (!worldObj.isRemote && rand.nextFloat()<0.1F)
//{

Random rand = new Random();
int posX=pos.getX();
int posY=pos.getY();
int posZ=pos.getZ();
int width=5;
int height=5;
//float height=5.0F; //* height
    
double motionX = rand.nextGaussian() * 0.02D;
    double motionY = rand.nextGaussian() * 0.02D;
    double motionZ = rand.nextGaussian() * 0.02D;
    worldIn.spawnParticle(

            "happyVillager", 

            posX + rand.nextFloat() * width * 2.0F - width, 

            posY + 0.5D + rand.nextFloat() * height, 

            posZ + rand.nextFloat() * width * 2.0F - width, 

            motionX, 

            motionY, 

            motionZ);

                   }
//##################################################################3

error:

The method spawnParticle(EnumParticleTypes, double, double, double, double, double, double, int...) in the type World is not applicable for the arguments (String, float, double, float, double, double, double)

 

and there is this object "EnumParticleTypes"  i dont have idea how to use

 

Link to comment
Share on other sites

What.. you have to specify the particle by EnumParticleTypes. (What are you actually doing, why did you put String in it..)

Just find the particle you want from there.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

 

well i dunot know what its "EntityParticleEmitter" its something eclipse put to correct another error

 

the point,

how i get or do ,declare  particles  to use in this,

 

this case it must spawn the particles in accordance with the block im rightcliking  so there must be somewhere something like

worldIn.getParticleFromblock(BlockPos);

Link to comment
Share on other sites

Ah you cannot do that with spawnParticle method.

just spawn EntityBreakingFX(World world, double x, double y, double z, Item item).

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

good nigths

 

lately  been far away from the minecraft coding soo until tonigth i test the code

 

public ItemStack onItemRightClick(ItemStack arco, World worldIn, EntityPlayer playerIn)
    {
    	
    	if (!worldIn.isRemote){
    		BlockPos ppos=playerIn.getPosition();
    		double x=ppos.getX();
    		double y=ppos.getY();
    		double z=ppos.getZ();
    		
    		EntityBreakingFX(worldIn, x, y, z, Items.emerald);
    		

 

it returns

The method EntityBreakingFX(World, double, double, double, Item) is undefined for the type arcoMercenario

 

and it has no options to imprt the EntityBreakingFX, could be that this method has another name in 1.8 ?

Link to comment
Share on other sites

good nigths

 

lately  been far away from the minecraft coding soo until tonigth i test the code

 

public ItemStack onItemRightClick(ItemStack arco, World worldIn, EntityPlayer playerIn)
    {
    	
    	if (!worldIn.isRemote){
    		BlockPos ppos=playerIn.getPosition();
    		double x=ppos.getX();
    		double y=ppos.getY();
    		double z=ppos.getZ();
    		
    		EntityBreakingFX(worldIn, x, y, z, Items.emerald);
    		

 

it returns

The method EntityBreakingFX(World, double, double, double, Item) is undefined for the type arcoMercenario

 

and it has no options to imprt the EntityBreakingFX, could be that this method has another name in 1.8 ?

 

It seems that you don't know basic java well.. Please Learn Java.

& What I meant was: create the EntityBreakingFX and spawn it in the world.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

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
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.

 Share

×
×
  • Create New...

Important Information

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