Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

fabricator77

Members
  • Content Count

    26
  • Joined

  • Last visited

Posts posted by fabricator77

  1. in WorldGenAPI

    ItemStack it = is[r.nextInt(amountOfItems - 1) + 1];

     

    But your giving it only 1 for amountOfItems in WorldGenWorkShop

    WorldGenAPI.placeModdedChestWithContents(w, x + x1 + 7, y + 1, z + z1 + 5, 2, 1, IceikaBlocks.frostedChest, i);

     

    End result, r.nextInt(0) which is returning -1 sometimes and crashing things.

     

    I'd fix placeChestWithContents and placeModdedChestWithContents, you've got multiple problems, for instance nowhere does it set the size of the itemStack placed in the chest inventory.

     

  2. Try this, based upon differences between your code, and the renderer for Minecraft chests.

     

    public void renderTileEntityAt(TileEntity tileentity, double x, double y,double z, float f) {
    GL11.glPushMatrix();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glTranslatef((float)x + 0.5F, (float)y - -1.5F, (float)z + 0.5F);
    GL11.glRotatef(180F, 0F, 0F, 1F);
    bindTexture(texture);
    GL11.glPushMatrix();
    model.renderModel(0.0625F);
    GL11.glPopMatrix();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glPopMatrix();
    }

     

    It's most likely the normal code that is your issue.

  3. pre 1.7.2 There is a list of biomes, you randomly choose one, then apply rivers and rare/edge/sub biomes.

     

    post 1.7.2 There is 4 separate lists of biomes, which are created in such a way as to apply all sorts of rules to what goes where.

     

    This is the main reason there isn't a simple GameRegistry.addBiomes any more. As you'd need to have 4 separate ones, plus some way to deal with Minecraft's own biome rules that make Mesa 50% of the desert biomes for instance.

     

    There are work arounds, which involve a lot of extra code to either:

    1. Provide your own GenLayer replacement code to swap some biomes for your biome.

    2. Paint a shape of your biome over the top of the end result (this is what Thaumcraft does with it's magical forest biome).

    3. Hack into the Minecraft code using reflection to override their stuff.

     

    I could write up in detail how the current biome code works, but it would take up 4 or more pages. Suffice to say there are a few issues that need to be resolved before we could even consider a set of Forge biome registration system.

  4. I'm planning on implementing some new features into my mod and for that I need more metadata per block. Only about a byte per block but I might end up using more than that for other things later.

     

    I have a hash table where the value is an int or byte, and the key is a tuple of 4 elements. Block coordinates x, y, z and dimension id. When I want to insert metadata at some location I create a tuple and put the relevant value at that location in the hash table. When I want to read it I can do the same. I save this hash table using the NBT.

     

    I think you'll find the real issues are memory and speed.

    How long does it take to generate a hash ?

    How long does it take to retrieve a set of values (from the hash table) for a single block ?

    How many blocks in world ?

    How much memory total for the number of blocks ?

     

    Even if you have a single one of your blocks visible, you need to have the data for all of them in memory.

    Also where do you plan to store the data itself ?

     

    Using a TileEntity is a much simpler method, especially if you need to add extra values for each block.

  5. The FTB Team said there is a vanilla bug that caused a memory leak every time you enter a different dimensions.

     

    I did ask if they had any more details on this, no reply.

     

    Most likely it's the Teleporter class, as that creates (and presumably hangs onto) a number of things like two WorldServers.

    Could also be a lot of different things in the world itself, like chunk loading/unloading.

  6. it mostly seems to be working now, although i got hit by a crash when trying to replace existing mobs with any of my own.

     

    i had to use full path to the class for it to work though (event.entity.getClass() == net.minecraft.entity.monster.EntityCaveSpider.class), just the EntityCaveSpider.class by itself didn't seem do to anything.

     

    You could also use .getClass().getSimpleName() == "EntityCaveSpider"

  7. In EntityEnderman.java another 256 block limit.

    private static boolean[] carriableBlocks = new boolean[256];

    and

    if (carriableBlocks[block.getIdFromBlock(block)])

     

    Another derp from Mojang, and yes it does crash at that if statement when the ID is above 255.

    Only fix at the moment is to use /gamerule mobGriefing false .

     

     

    Also none of the sound effects for the Witch mob work, not sure when/how that happened.

  8. 1.) Set the hardness to 2000000 or whatever obsidian is set to.

    2.) Dig a hole straight down.

    3.) Spawn in TNT to fill said hole.

    4.) Light it up.

    5.) Repeat steps 3 & 4.

     

    I do this to also test spawning frequency as well.

     

    Could also try replacing the mob spawns with EntityTNTPrimed and let the mobs blow everything up for you.

  9. OK I've got two @SubscribeEvent handlers

    Neither of them work for my purposes.

     

    This one is called when the Player is connected, which does work most of the time.

    However sometimes the data is needed before the world loads, which causes a crash.

    public void onPlayerLoggedIn(PlayerLoggedInEvent event)

     

    called earlier, seems ideal, but as client isn't initialized at this point, the packet send isn't received.

    I cut and pasted the packet send code into two classes, the other is a CommandBase (server chat command) so common code in both.

    public void onClientConnected (ServerConnectionFromClientEvent event)

     

    It's all very frustrating, the data is akin to block ids, needs to be registered before it tries to use it.

  10. I need the replacement methods for 1.6.x's IConnectionHandler, namely connectionReceived (server side) and connectionClosed (client side).

    Specificity connectionReceived was triggered after the mod version check etc but before world loading.

     

    This is for a mod that needs to register/de-register something client side, and the server sends the details as a event when the client connects. I'm storing the data so it can be removed by the client.

     

    I've found a few different classes that deal with this, but no obvious way to subscribe to the events or to insert my own event handler.

    This is the last thing I need to release my mod, my netty code works, I just need the trigger to send it.

  11. I'm blaming Mojang for some of this nonsense.

     

    If you take a look in FolderResourcePack.java

    if (!s.equals(s.toLowerCase()))
    {
        this.func_110594_c(s);
    }

     

    which roughly translates as:

    if mod name contains upper case letters, then throw an error and refuse to do anything with it.

     

    Anyone happen to know which string it uses in this function, eg is it Mod.modid, Mod.name or something else ?

  12. What part of:

     

    Fork

    Pull

    Setup

    Edit

    Update_patches

    Commit

    Push

    PR

     

    Don't you get?

     

    Hmm the part where its possible to find that information. It should be in the wiki or some text file in the project itself, not in some random thread involving a minor bug fix.

     

    Also dont use mcp/eclispe, use forge/eclipse, it has projects setup already.

    The fact that you said it was 'overengineered' just shows that you haven't take the time to actually read what it does. Its all rather simple, but not as simple as a 'simple look and a diff command'.

     

    Read what, the python scripting ? Which like MCP contains no real code comments I might add. Code and function are not always one and the same.

     

    Thing is none of the minecraft base classes I'm patching exist in Forge yet, so its simply a straight patch between vanilla and modified files. So all I need is to have it loop though some directory pairs, find the differences and produce the .patch files.

     

    ps: I'm not using eclipse anyway, I've not needed any of its features so far.

  13. Sorry LexManos or whoever built these scripts, but I just can't figure out how to get it to work as it should. But after 4 days of fiddling around and poking it with a stick, its still driving me crazy.

     

    First problem, complete lack of documention (that I can find online) on what build/release/setup actually do.

     

    I have MCP 7.2 and Forge from this link as the zip file version.

    https://github.com/MinecraftForge/MinecraftForge

    Extract MCP, put forge folder within that, add minecraft bin folder to the jars folder.

     

    I understand what update_patches does, and that part works AFAIK but I just cannot get any of the others to put actual source code anywhere. The original code goes in src_base and the stuff I've modified goes into src_work, I just cannot get it to decompile minecraft itself rather than just forge. I tried the install script outside its subfolder but it throws errors as well, which is well wierd, never had this problem with earlier releases.

     

    I'm sure there is a simple way to set this all up, but after 2 days I still can't get it to behave. Anyone able to provide a simple install this here, run this to the point where I can actually use update_patches ? I've dealt with all the other stuff like setting up GIT etc.

     

    If not I'll just pull update_patches apart and write my own version. The whole thing seems overengineered for a simple loop and a diff command (and why not just use src and mod_src ?), and besides I don't like python that much.

  14. From the website:

    NOTICE: This mod is no longer under development and I am not hosting binaries (the build server has been turned off). If you wish to use or develop this mod, you will need to download it from source.

     

    So its dead in the water at the moment, and the last version is for Minecraft 1.2.5, so it would need the same sort of rewrite that forge is currently going through. In any case a C# project is going to face other problems, like Minecraft servers that use linux based operating systems.

     

    Anyone that has done modding before has had to learn a new language, I've written a mod LUA long before Minecraft existed, so learning Java was just another language.

  15. I've added a few lines of code to StructureComponent so it can determine its called class, eg: ComponentMineshaftCorridor.class and use that name to store each set of loot. This way any structure created gets its own unique loot set, even ones added by modders. Still need to write a data structure to store it all, then look at the pull request.

     

    StructureComponent.class contains:

    func_74879_a

    Loot chests

     

    func_74869_a

    Dispensers

     

    So I might at well tap into the Dispenser code, so mean people can put fire arrows in them or something.

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.