• 0

    posted a message on Tile Entity Help!
    Just so you know, the block doesn't have to extend BlockContainer, It can also implement ITileEntityProvider. They both work exactly the same, however; use whichever you want.
    Posted in: Modification Development
  • 0

    posted a message on Need Help with Custom Block
    You mean, you want to be lazy and just copy someone else's code rather than trying to code yourself?

    If you do it that way, you'll never get better at modding minecraft.
    Posted in: Modification Development
  • 0

    posted a message on Changing item color based on tile entity values
    So I'm making an item which does as the title suggests, however I'm running into a (rather large) problem.

    I have a tile entity which spawns custom particles which are colored based off tile entity values. I want the item to, when right clicking that tile entity, get those values, and save them to its own nbt (which works, afaik). If I right click on the block, it changes the color to that of its particles, and gives it nbt data for that. However, here's the problem: whenever I right click on anything else after right clicking the block, it reverts the color back to what it was before.

    Here's the item code:
    package com.blueraven.magicmod.item;
    
    import com.blueraven.magicmod.tileentity.TileEntityPylon;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.ItemStack;
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.network.NetworkManager;
    import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
    import net.minecraft.util.EnumChatFormatting;
    import net.minecraft.world.World;
    
    import java.awt.*;
    import java.util.List;
    
    public class ItemColorCrystal extends ItemBase
    {
     public ItemColorCrystal()
     {
     super();
     this.setUnlocalizedName("colorCrystal");
     //this.setTextureName = "colorcrystal";
     }
    
    @Override
     @SideOnly(Side.CLIENT)
     public int getColorFromItemStack(ItemStack stack, int renderPass)
     {
     //if (!(stack.stackTagCompound.getInteger("colorHEX") == 0))
     {
     int red = stack.stackTagCompound.getInteger("colorRed");
     int green = stack.stackTagCompound.getInteger("colorGreen");
     int blue = stack.stackTagCompound.getInteger("colorBlue");
     Color c = new Color(red, green, blue);
     return c.getRGB();
     }
     //else return Integer.parseInt("ffffff", 16);
     }
    
    @Override
     public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10)
     {
     TileEntityPylon tePylon = (TileEntityPylon) world.getTileEntity(x, y, z);
    
    if (world.getTileEntity(x, y, z) instanceof TileEntityPylon)
     {
     stack.stackTagCompound.setInteger("colorRed", tePylon.red);
     stack.stackTagCompound.setInteger("colorGreen", tePylon.green);
     stack.stackTagCompound.setInteger("colorBlue", tePylon.blue);
     return true;
     }
     return false;
     }
    
    public void onUpdate(ItemStack stack, World world, Entity entity, int par1, boolean B)
     {
     /*if (stack.stackTagCompound == null)
     {
     stack.stackTagCompound = new NBTTagCompound();
     }
     if (world.isRemote)
     {
     stack.stackTagCompound.getInteger("colorRed");
     stack.stackTagCompound.getInteger("colorGreen");
     stack.stackTagCompound.getInteger("colorBlue");
     }*/
     }
    
    @Override
     public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4)
     {
     if (stack.stackTagCompound != null)
     {
     int red = stack.stackTagCompound.getInteger("colorRed");
     int green = stack.stackTagCompound.getInteger("colorGreen");
     int blue = stack.stackTagCompound.getInteger("colorBlue");
    
    // Color color = Color.decode(crystalColor);
     list.add("Current colors stored:");
     list.add(EnumChatFormatting.RED + "Red: "+ red);
     list.add(EnumChatFormatting.GREEN + "Green: "+ green);
     list.add(EnumChatFormatting.BLUE + "Blue: "+ blue);
     }
     }
    }

    Syntax highlighted version (pastebin)

    I have absolutely no idea why this happens, and I have tried multiple things but I can't seem to fix it. What I'm guessing is happening is that the server and client are out of sync.

    another weird thing is that if I look at the item information (hover over it) the color won't revert to what it was before.
    Posted in: Modification Development
  • 0

    posted a message on Disabling the generation of certain ores
    anyone?
    Posted in: Modification Development
  • 0

    posted a message on Disabling the generation of certain ores
    As the title says, I need help disabling the generation of iron and gold ore, as I am trying to add my own version of these blocks.

    My world generation code

    I think I also need help making a block generate with metadata.
    Posted in: Modification Development
  • 0

    posted a message on Making a random metadata item drop whenever is broken
    Thank you, this helped. it's working now. :)
    Posted in: Modification Development
  • 0

    posted a message on Making a random metadata item drop whenever is broken
    EDIT: I forgot a word in the title, *whenever a Block is broken. sorry.

    I'm trying to get a block, whenever broken, to drop a random item. I can get that to work, I just can't figure out how to make it drop an item with metadata on it. If I set it to the item it just drops the first item.

    Pastebin of the block I want to drop the items. Also I'm sure that's not the most optimal way to get a random item, so if you could help me clean that up as well, that would be appreciated.

    Pastebin of the item itself, not sure you need this, or what else you need.
    Posted in: Modification Development
  • 0

    posted a message on [1.2.5] ✧✦✧ Golden-Wind ✧✦✧ [Classes] [No PVP] [Anti-Grief] [Towny] [Economy] [Custom Plugins] [Quests]
    What's your in-game name? Blue_Raven
    Did you read the rules? Yes.
    Do you accept the rules? Yes.
    Did you vote on minestatus(please make sure you are online when you are voting)? No
    A little bit about yourself: I like playing minecraft and other video games. I have never greifed on any servers I have joined. I have been playing minecraft since the 1.2_02 patch. I love playing with redstone and creating awesome stuff :)
    Posted in: PC Servers
  • 0

    posted a message on RAVEN MOD
    I'd like this mod :3 hehehehehe
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.0.0] Minecraft 'The Official Game' Server
    IGN: Blue_Raven
    Age: 13
    How Long Have I played: since 1.2_01
    Do you enjoy vanilla? Yeah, definitely. There are some good mods out there but nothing beats plain 'ol vanilla.
    Posted in: Minecraft Survival Servers (archive)
  • 0

    posted a message on [1.0.0] More And More Rocks!!! (100+ downloads!!!)
    Try and make them dyable, That would look nice.
    Posted in: Minecraft Mods
  • 0

    posted a message on 1.8 Survival.
    IGN: Blue_Raven
    Age: 13
    Location: U.S.A.
    Have you read the rules? Do trees in survival grow waffles? Yes.
    Anything else you would like to tell us? THERE'D BETTER BE WAFFLES ON THE SERVER! *posts manditory image of an engie in tf2 eating a waffle* Yeah. Your server looks cool, and I've been trying to find a good whitelist server because the others without one are too greifed.
    Posted in: Minecraft Survival Servers (archive)
  • 0

    posted a message on The Twilight Forest (v2.3.5: Wrecking Block)
    Wow, this looks amazing. Great job on the world generation! :biggrin.gif:
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.7.3]AvAMod [1.02]
    Is it possible to keep ur old skin when you have a different model, even when your model has a specific skin? As in if people dont have ava mod then they see your normal skin, then if they do they can see the model's specific skin.
    Posted in: Minecraft Mods
  • 0

    posted a message on 1.8 Updates: Textures & More
    Anyone else see the ice cream bar at 14-6? xD awesome xD unless those are the shears...
    Posted in: Minecraft News
  • To post a comment, please .