• 0

    posted a message on [UNSOLVED]Potions
    This was asked a while back and as KJudera said, it's not an easy task.
    http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/modification-development/1437309-unsolved-potions

    Other Information:
    http://minecraft.gamepedia.com/Potions
    https://docs.google.com/spreadsheet/pub?key=0Ap8gssssFFPAdHpndGhfVktVSEdlT3l4NkYwQVJxdGc&output=html
    https://docs.google.com/presentation/d/14An8As60TmVD0s9mXaZh9dBNWz6t-jkRJs-Hxo0jBoY/pub?start=false&loop=false&delayms=60000
    Sorry for not finishing the slideshow, probably will never because it's been so long.

    That can get you started, but Minecraft has changed since so it may not be 100% correct.
    Posted in: Modification Development
  • 0

    posted a message on Gradle says JDK isn't on the path even though it is
    Quote from Koslaw
    Looks like I miss understood the JAVA_HOME thing. I get this now:

    ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.7.0_
    45\bin;

    Please set the JAVA_HOME variable in your environment to match the
    location of your Java installation.

    Remove the bin directory. "JAVA_HOME" refers to the root directory of your JDK.
    C:\Program Files\Java\jdk1.7.0_45
    Posted in: Modification Development
  • 1

    posted a message on Folder not appearing on IntelliJ
    I think those colors correspond to your version control; like Github.
    http://www.jetbrains.com/idea/webhelp/file-status-highlights.html

    Check and see if there are any conflicts.
    Posted in: Modification Development
  • 1

    posted a message on Folder not appearing on IntelliJ
    Open Project Structure >> Modules >> Sources tab
    If you do come across red folders in the tree, just toggle the 'Excluded' folder in Mark As at the top.

    For simple projects, you should only have one source(blue) folder, the root source folder. You shouldn't have any excluded(red) files/folders unless you don't want to compile them. My best bet is you have client/gui folder marked as excluded. If that's not the case I don't know what could be the issue.
    Posted in: Modification Development
  • 0

    posted a message on Folder not appearing on IntelliJ
    Just a thought, have you checked if you are excluding the folder from sources? Open Project Structure >> Modules >> Sources tab, and navigate through your source tree to see if any of them are red(excluded). If so, just highlight it and mark it as Sources(blue).

    Correction:
    If you do come across red folders in the tree, just deselect 'Excluded' folder in Mark As at the top.
    Posted in: Modification Development
  • 0

    posted a message on Folder not appearing on IntelliJ
    In the image you provided, switch from 'Packages' to 'Project' view and see if the folder exists there. It should appear in both views but maybe it's now showing as a package.
    Posted in: Modification Development
  • 0

    posted a message on Custom Entity Problems
    Oh, lol.

    The Line of CODE]{EntityRegistry.registerGlobalEntityID(EntityDan1.
    class, "dan1", EntityRegistry.findGlobalUniqueEntityId(), 333333, 0xFF9900); is just fine it works perfectly, as my intentions the spawn egg too.


    Well, it does work because the Forge's Mod entities are checked before Minecrafts(Vanilla). It's just those methods weren't meant to work together, but it does for now. If you do start to get problems, just use the code I put above to register the eggs.

    As for the language registry. Forge doesn't use the LanguageRegistry anymore. Instead you put your own language file in src/main/resources/assets directory.

    For english, create en_US.lang file.
    Then put your entity,item,blocks, etc. names in there
    entity.dan1.name=Dan's Name

    Make sure there aren't any spaced between the equals sign.
    Posted in: Modification Development
  • 0

    posted a message on Custom Entity Problems
    extremely skeptical

    Why? It's how you register and handle Entities with Forge. Nothing to be skeptical of.

    {EntityRegistry.registerGlobalEntityID(EntityDan1.
    class, "dan1", EntityRegistry.findGlobalUniqueEntityId(), 333333, 0xFF9900);
    
    } 

    Did you mean to delete this, or are you using these lines to create a spawn egg? Don't register the same entity on Global and Mod registries.

    Use this to add your spawn egg
    // Class Field
    private static int startEntityId = 300;
    
    public static int getUniqueEntityId() {
    do {
    startEntityId++;
    } while (EntityList.getStringFromID(startEntityId) != null);
    
    return startEntityId;
    }
    
    public static void registerEntityEgg(Class<? extends Entity> entity,
    int primaryColor, int secondaryColor) {
    int id = getUniqueEntityId();
    EntityList.IDtoClassMapping.put(id, entity);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor,
    secondaryColor));
    }

    It's been a while since I've used this code, so it may not work. Which I will test it out later.
    Posted in: Modification Development
  • 0

    posted a message on Custom Entity Problems
    This was a big issue a while back when 1.3.1 was out. I did a explanation on it. It's a lot to read but what's happening is ModLoader is assigning your Id that is out of bounds for it to handle. You said you're using Forge? If so, don't use Modloader at all, convert your mod to Forge and read this post.
    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] [Help] Finding the source of a stackoverflowerror
    Not a easy recursive method error :P
    Here's whats happening
    darkevilmac.utilities.tile.TileEntityEnergyPipeBrain.reformPipeNetwork(TileEntityEnergyPipeBrain.java:146)
    at darkevilmac.utilities.tile.TileEntityEnergyPipeBrain.validate(TileEntityEnergyPipeBrain.java:30)
    at net.minecraft.world.chunk.Chunk.setChunkBlockTileEntity(Chunk.java:1036)
    at net.minecraft.world.World.setBlockTileEntity(World.java:2927)
    at net.minecraft.world.chunk.Chunk.getChunkBlockTileEntity(Chunk.java:992)
    at net.minecraft.world.World.getBlockTileEntity(World.java:2865)


    // darkevilmac.utilities.tile.TileEntityEnergyPipeBrain.reformPipeNetwork(TileEntityEnergyPipeBrain.java:146)
    pipeToSet.setBrain(((TileEntityEnergyPipeBrain) world.getBlockTileEntity(x, y, z)));


    world.getBlockTileEntity(x, y, z) is the problem.
    If you follow the trace up from net.minecraft.world.World.getBlockTileEntity(), it will eventually call your Tile entity validate method again.

    at net.minecraft.world.chunk.Chunk.setChunkBlockTileEntity(Chunk.java:1036)
    par4TileEntity.validate();

    That variable would be your Tile Entity, and from looking at your validate method code, it will call reformPipeNetwork(). Now we are at step one again.

    Hope that helps you understand the error.
    Posted in: Modification Development
  • 1

    posted a message on 2/19/2014: I cannot find MCP for MCv1.7.2
    MCP only
    It seems there are only on his twitter feed, which are non official. Some guy created a scrapper for searge's twitter page.
    http://mcp.llbit.se/

    Forge
    I'd recommend you use Forge which downloads MCP.
    http://files.minecraftforge.net/
    http://www.minecraft...allation/Source
    Posted in: Modification Development
  • 1

    posted a message on Registering an entity error?
    Quote from Anon10W1z

    Well that fixed the problem. I followed these tutorials to get started, and they declared the methods as static.

    From reading that, I wouldn't look into his tutorials; giving bad advice. Honestly, I don't have a good tutorial for modding, but Mazetar has a good list to choose from.
    Posted in: Modification Development
  • 0

    posted a message on Registering an entity error?
    Why are you declaring your methods static? Remove the static identifier. I would read more up on Java development through an online source or book.
    Posted in: Modification Development
  • 0

    posted a message on Registering an entity error?
    You are not using the method correctly.
    EntityRegistry.registerModEntity(bedrockTNTprimed.class, "bedrockTNT", EntityRegistry.findGlobalUniqueEntityId(), bedReload.class, 128, 1, true);

    Should be
    EntityRegistry.registerModEntity(bedrockTNTprimed.class, "bedrockTNT", 1, this, 128, 1, true);

    I see you put 1 as the update frequency. That's higher than the main player entity! I would use 10 or 20, depending on what your entity does. Take a look at this chart for more info.

    The reason why you got a NullPointerException was because instead of supplying the mod instance, you put bedReload.class instead. Also I put 1 as the entity Id. Note this has nothing to do with global entities. Just make sure each entity in your mod has a different id. 1, 2, 3, 4, and so on.

    Here is a full explanation. I was created when 1.4.2 was out, but not much has changed about Registering entities.

    From Video
    EntityRegistry.registerModEntity(EntityTutTnt.class, "TutTnt", EntityRegistry.findGlobalUniqueEntityId(), this, 128, 1, true);

    *sigh* People who don't know what they are doing while teaching others.
    Posted in: Modification Development
  • 2

    posted a message on Organzing/making this code run
    I take it you're learning Java from a book or online source, so I'm not going to go over everything in detail.

    First off, read Java's naming conventions. Official link.

    package me.BrushPainter.ClearRealms;

    Remove the top-level me package and make it all lowercase. If you like, you can add bukkit package after your name.
    package brushpainter.bukkit.clearrealms;


    public class Main extends JavaPlugin {

    The class name should mean something more than Main. Not that it's a bad word for a class, just Main usually refers to the class which has the main method; this one doesn't. ClearRealmsPlugin is a better name.

    I see you made a class(sub-class), myCustomInventory, to hold your Inventory field. You're not understanding the uses of classes. You should of declared your inventory in the ClearRealmsPlugin class instead. Read up on OOP.

    Put the inventory field in the ClearRealmsPlugin class. I would change the name from myInventory to rewardInventory. The plugin's OnEnable method is like a constructor and is called when craft bukkit loads, or the reload command is called. Initiate your objects like rewardInventory in there.

    In order to use Events, you must implement the Event Listener and register it with bukkit. Here is a full tutorial.

    Information regarding Commands.

    I also renamed some variables to make them more understandable.

    Source
    ClearRealmsPlugin.java
    EventListener.java

    EDIT
    You should get in the habit using the @Override annotation when overriding or implementing methods. That way you and the compiler know which methods are overridden. Consider the following

    @Override
    public void onEnables() {
        // ...
    }

    That may look like the plugin's on enable method, but it's spelled wrong. With the @Override annotation, the compiler will tell you that method doesn't not exist in the superclass. Also IDE's will check it automatically too.
    Posted in: Modification Development
  • To post a comment, please or register a new account.