Posted September 30, 201312 yr EDIT: Ok I found the OnBlockActivated method, so thats the first thing. Now, which method do I call to spawn the fireworks? I believe I can handle it from there For anyone thats wondering, I am making a mod for my girlfriend, she also plays Minecraft. Thought it'd be a fun project. I want the block to basically activate a "celebration" of fireworks, about a radius of 5 blocks away from the block on right clicked.
September 30, 201312 yr Fireworks are entity, so just spawn them *Note, not accurate code, but somewhat close The onBlockActivated method should give a world reference (ex. par1World). I woulkd start by building the entity data first, then spawning it. onBlockActivated(par1World, x , y , z , other stuff){ EntityFirework ent = new EntityFirework(insert some stuff here); ent.(set values like position, speed, yaw, pitch, color, effect, tick age, etc.) //NOTE: This is very important to stop dummy entities if(!par1World.isRemote){ par1World.spawnEntity(ent); } Pm me if you need help. "you seem to be THE best modder I've seen imo." ~spynathan ლ(́◉◞౪◟◉‵ლ
October 1, 201312 yr More accurately would be FireworkEntity ent = new FireworkEntity(par1World); ent.setLocationAndAngles(stuff); //write firework specific variables here par1World.spawnEntityInWorld(ent); Pm if you need help "you seem to be THE best modder I've seen imo." ~spynathan ლ(́◉◞౪◟◉‵ლ
October 5, 201311 yr Author The forums are deff not as active as they used to be... or atleast not as many people are replying as they used to
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.