Jump to content

ThePlaitnumTaco

Members
  • Posts

    1
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

ThePlaitnumTaco's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. <storytime>For a basic modding class, I decided to do a simple little set of ruby blocks. One of those is an enchanted ruby block, that looks just like a normal ruby block EXCEPT (the plan is, anyways) it had the smoke particles that come off of nether portals and ender eyes. Unfortunately, I can't find any information on how to do that and lately I've been stuck trying to get .spawnParticle to work on a block. I've tryed a lot of crap and I honestly don't remember what, but this is my current code, copied mainly from the code for ender eyes (Possibly doesn't work because my block isn't an item/entity?) import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.world.World; import com.grady.gradymod.BaseBlock.BaseBlock; import cpw.mods.fml.common.registry.GameRegistry; public class EnchantedRubyBlock extends BaseBlock { protected static Random itemRand = new Random(); public EnchantedRubyBlock(Material material) { super(material); setHardness(10); setBlockName("EnchantedRubyBlock"); setCreativeTab(CreativeTabs.tabBlock); setLightLevel(0.1F); setBlockTextureName(GradyMod.MODID + ":" + "EnchantedRubyBlock"); // EntityFX candleFlame = new EntityFX(World world, 10, 10, 10); // Minecraft.getMinecraft().effectRenderer.addEffect(candleFlame); } public void onTick(World par1World, int par2, int par3, int par4, Random par5Random) { double d0 = (double)((float)par2 + (5.0F + itemRand.nextFloat() * 6.0F) / 16.0F); double d1 = (double)((float)par3 + 0.8125F); double d2 = (double)((float)par4 + (5.0F + itemRand.nextFloat() * 6.0F) / 16.0F); double d3 = 0.0D; double d4 = 0.0D; double d5 = 0.0D; par1World.spawnParticle("smoke", d0, d1, d2, d3, d4, d5); } } This doesn't work, but also doesn't give any errors and therefore vaults itself to the top of the line of possible leads. Any other ideas? One liners? Wierd hacks or tricks? If you could post them here please, that would be great.
×
×
  • Create New...

Important Information

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