• 0

    posted a message on -SOLVED-[SEVERE] Encountered an Unexpected Exception LoaderException-SOLVED-
    Somewhere in your code is referencing to WorldClient. That class doesn't exist on a server because it uses WorldServer.

    Java knowledge gets you a long way, especially when facing errors like this...
    Posted in: Server Support and Administration
  • 0

    posted a message on Custom ore breaking with any pickaxe?
    Quote from JP2012

    I don't really understand why you need to ask this. When I joined this forum I was hoping the level of understanding would be greater than that, that has been shown so far for me.

    Just look how obisidian mining is handled, and replicate it for your mod.

    TIP: Use the mass string search in Eclipse (if your using that IDE) to search for the obsidian block class references.

    - JavaPortals

    He did mention that. Mining of obsidian is handled in ItemPickaxe.
    *EDIT*: I also know I can edit ItemPickaxe.java, but I really dont want to mess with base classes, that would just make the mod harder to install, especially for SMP.

    To avoid editing base classes, you would use the Forge method like he showed. But for some reason which we are looking to solve, it isn't working.
    Posted in: Modification Development
  • 0

    posted a message on Custom ore breaking with any pickaxe?
    I can't tell you why the method isn't working for you but I can tell you that the hardness float is only used for the time it takes to destroy the block, not to do with the harvest level.

    Post your code please.
    Posted in: Modification Development
  • 0

    posted a message on So... I was look for a certain block file
    Iron bars use BlockPane. Just look in Block if you aren't sure, all blocks are instantiated there.
    Posted in: Modification Development
  • 2

    posted a message on How to Set Fire to an Entity When Hit With a Weapon
    Quote from JP2012

    There's a method in Entity (I think) which is called when a player (or entity) interacts with another entity. Use this method. Check which item the player is currently holding, and call the setFire method in the entity instance. Here's an example from a mod I made from ages ago. The following example uses EntityAnimals' interact method.





    That should help you considerably.

    - JavaPortals

    That will only work for right clicking the entity. :)

    @OP

    public void hitEntity(get params from ItemSword)
    {
    par2EntitityLiving.setFire(burn time in seconds);
    }


    I left a few important things out. You'll see them when you get the method from ItemSword.
    Posted in: Modification Development
  • 1

    posted a message on How to Set Fire to an Entity When Hit With a Weapon
    Use the hitEntity method and set the first of the two EntityLiving parameters on fire.
    Posted in: Modification Development
  • 0

    posted a message on [ModLoader] Teleporting 6 blocks in the direction you look.
    Quote from poofy96

    Well, that is the problem. It needs to be 6 blocks in the direction the look, not 6 blocks in a certain direction from the players current position. (If I did that, I could only make them teleport 6 blocks in a set direction, not where they look)

    Also, how would I actually get the game to move the player to the new position after they click "F"?

    (all client sided, this is not a server mod :) )

    I was just showing you the code that you can use to move the player, then use integerArray's post to help you with actual positioning.


    Whether you are making it a server mod or not, you need the server code for the integrated server which single player runs on.
    Posted in: Modification Development
  • 0

    posted a message on Error when trying to test mod
    Use
    return mod_mysteryores.MysteryGem1.itemID;
    instead of
    return mod_mysteryores.MysteryGem1.iconIndex;
    Posted in: Modification Development
  • 0

    posted a message on Error when trying to test mod
    ChickenNuggster is correct. Don't use getUniqueEntityId() for blocks. As the method name says, it is for entities. I also suggest a config file.
    Posted in: Modification Development
  • 0

    posted a message on [ModLoader] Teleporting 6 blocks in the direction you look.
    To teleport the player, use these methods:
    //For client
    Minecraft.getMinecraft().thePlayer.setPosition(x, y, z);
    
    //For server
    ((EntityPlayer)MinecraftServer.getServer().getConfigurationManager().playerEntityList.get(0)).setPosition(x, y, z);


    Just replace the xyz with the position you want.
    Posted in: Modification Development
  • 0

    posted a message on SOLVED
    The addToolMaterial method is a obviously a client side method. I'm not too sure how to fix it as I'm looking for the solution as well.
    Posted in: Modification Development
  • 0

    posted a message on [1.4.7] Undead+ V.0.9.9
    I really can't see what is causing the entity crash, I'll keep looking though. I'm not sure what is causing the other problems with the crashes. I don't really use any mods.
    Posted in: WIP Mods
  • 0

    posted a message on Help with mob held item code.
    Quote from gegy1000

    I had the problem but I was using forge. There Is nothing in render living that allows it to hold an Item or in your model

    The renderEquippedItems method in RenderBiped is where it is rendered.
    Posted in: Modification Development
  • 0

    posted a message on Help with mob held item code.
    It doesn't matter if it is static or not. Try adding a quantity after the Item.

    private static final ItemStack heldItem = new ItemStack(Item.appleGold, 1);
    I made a few other edits to that line as to how I have mine working.
    Posted in: Modification Development
  • 0

    posted a message on [1.4.7] Undead+ V.0.9.9
    Quote from Zookid

    Thanks a lot! By the way, I forgot to mention that the Necromancy mod may also be the cause, though the chance is very low.

    EDIT: Alright, I've had it. Almost every time I load my modpack world, die, go through a portal, or just plain play the game, I get this same crash, and I am sick of it!!!! I was wondering if you, seeming like a nice guy and just as good coder, could PLEASE help me with this terrible nuisance! I was going to PM the message to you, but felt it right to ask first. PLEASE help me! Sorry if this is off-topic, but I am just finished with this error.

    Thaumcraft is causing the incompatibility with Undead+(or vice versa). Try removing Undead+ and see if that solves the crashing problems with portals, etc.
    Posted in: WIP Mods
  • To post a comment, please .