• 0

    posted a message on Drawing Rect on GUIContainer

    Your color isn't correct. If you step into the drawRect function you can see the f,f1,f2,f3 variables which hold the rgba values for the color. f3 is the alpha value, and (0x800000 >> 24 & 255) / 255.0F is 0.0f, so your alpha is 0, which means it is transparent. Try a bigger value :)


    1342177280 is a gray color, for instance.

    Posted in: Modification Development
  • 0

    posted a message on [v0.5.0]Project Bench - 1.9 Support Added! [WIP]

    Um. Hey. So randomly sat down and updated to 1.9. No new features, just code base update to 1.9. Not as much changed this time around, phew. Not really tested though, and i did see a bug with multiplayer not seeing the an updated render above the bench after they initially load in and aren't crafting.


    Anyways, download from this page.

    Posted in: WIP Mods
  • 0

    posted a message on Teleporting a player when cake is eaten.

    Basically the idea is you should sweep the area around the cake block, and look for a block that is solid and that has two blocks of air above it.

    Posted in: Modification Development
  • 0

    posted a message on Need a mod maker

    Just an FYI, this isn't so simple as you say it is. Not undoable. Adding new things is pretty straight forward. But adding new things to existing classes (the chest's gui) isn't so straight forward unfortunately.

    Posted in: Modification Development
  • 0

    posted a message on Teleporting a player when cake is eaten.

    Going to want to use this method:

    setPositionAndUpdate(posX, posY, posZ);

    As for the logic, you have to be careful when teleporting, because you don't want to teleport the player into the ground or into a tree or etc. If you look at the EntityEnderman class, the method "teleportTo" has a bunch of logic to make sure the teleport is successful.

    Posted in: Modification Development
  • 0

    posted a message on Weird packet exceptions

    coming from this line in the NetHandlerPlayServer:

    this.sendPacket(new S2FPacketSetSlot(this.playerEntity.openContainer.windowId, slot.slotNumber, this.playerEntity.inventory.getCurrentItem()));

    has to be the "slot" that's null, other ones look like they're all null checked. No idea why this is happening though

    Posted in: Modification Development
  • 0

    posted a message on Need to check if there is a block anywhere above the player

    I believe in 1.8 there's a "isAirBlock" method, but i can't remember exactly what it is atm.


    for (int i = 0; i < checkHeight; i++) {
        if (world.isAirBlock(new BlockPos(player.posX, player.posY + i, player.posZ)))
            return true;
    }
    Posted in: Modification Development
  • 0

    posted a message on {1.7.10} Armour that gives creative flight

    How about this in onArmorTick:

    if(player.getCurrentArmor(0)
      ....
    } else {
      if(player.capabilities.allowFlying == true && !player.capabilities.isCreativeMode) {
        player.capabilities.allowFlying = false;
      }
    }


    I mean it's not perfect, but this goes off the idea that the player has to unequip the armor an item at a time, and so there'll be a tick to disable it? Do the items receive "onUpdate"? I know it's used for inventory, but does that get called for armor pieces too? Just looked at the code, doesn't look like it does

    Posted in: Modification Development
  • 0

    posted a message on Forge Mod Cant Find Class

    Can you post your main @Mod file? It looks like you're doing @SidedProxy without implementing "serverSide" and "clientSide"

    Posted in: Modification Development
  • 0

    posted a message on Everyweeks with _bau5 - Week One: Shadowstep
    o/
    I recently began a sort of challenge that has you creating some sort of content every week. I decided to make Minecraft mods for it. So, for as long as I can keep up with it, that's what I'll be doing. I'm going to be posting them all under this thread, but they will all be packaged separately as each is going to be a stand alone mod. Currently I have no plan for what I'll be doing each week, but at some point will probably make an outline of sorts. I'll be glad to take suggestions, however that is not what this thread is for (and no guarantees, I'll only tackle a suggestion if it's something I'd enjoy making).

    Week One [8/16-8/23]:
    Shadowstep adds a single item, the Shadowstep Catalyst.

    When the player selects it and holds right click while aiming at a block, it will attempt to charge up and teleport the player on top of that block. It isn't simply a point and click and you're there form of transportation, but a bit more complicated. Holding right click charges the Catalyst and increases it's potential range, to a maximum of 25 blocks, like charging a bow increases its damage.

    Particles will appear on the face of the block that's under the cursor, and when the Catalyst has reached sufficient charge and can step to the block, a sound will play. It only takes a couple seconds to reach full charge, but if you're looking at a block and you don't hear the sound, that means the block is out of the 25 block range. You're free to look around while holding it and each time you look at a new block, a sound will play if it can reach that block.

    Any step discharges the item (5 points for a 25 block step, for the tech savvy). With a full charge, it can do 20 full reach steps before being depleted. The amount discharged is dependent upon the distance stepped, but it is linear; that is to say only doing shorter steps won't discharge it slower than doing longer steps.

    The item has no crafting recipe and cannot be actively repaired by the player. It will however recharge during the night (note that it doesn't require to be in the dark, just that it's during the night hours of Minecraft). As for acquiring the item, it can be found in various loot chests. It can be found in Nether Fortresses, Strongholds, Pyramids, and Dungeons with a rarity like that of the Enchanted book. It can also be found in Mineshafts, but with far lesser chance of spawning. It will not spawn in Blacksmith chests though.


    Information

    This entire project will be open source and can be found here on GitHub. I encourage anyone interested in modding or improving to look through the code. Additionally, I'm being extra verbose in my commits, and dividing them up a lot more, hopefully so that an onlooker can see the exact development process that I follow. If the code is confusing or there are any questions that you might have, feel free to reach out to me either here or on GitHub and I'd be more than happy to help. I welcome contributions as well, but will nit pick on formatting, code style, and logic. I may post my IntelliJ settings jar if there is interest in contributing.


    Each mod here will be developed in a single week, but that's not to say I won't support them after that week is over. If there are any game breaking bugs or unanimously wished for alterations, I'll make the needed changes. However typically after each Everyweek is released, they won't see any new features (unless I become particularly interested in that one).

    Issues

    Please report any issues either here, or preferably on GitHub (much easier to track there).

    Posted in: Minecraft Mods
  • 0

    posted a message on Scripting Mods?

    No I think that sounds very manageable.

    I'd recommend this development flow:

    1. Make the block
    2. Make the TileEntity (any block with a gui that retains an inventory/does something over time, like furnaces, or chests uses a TileEntity)
    3. Make the Container (what provides the slots that you click on to access the inventory, which is stored in the TileEntity)
    4. Make the Gui (the client side element that we interact with, will have the texture and the underlying Container).
    5. Now start on the logic for the "extracting", look at the furnace update() method for direction on this.

    I'd also recommend looking for a tutorial on how to create a container with a tile entity. That'll walk you through how to do it exactly. Make sure the tutorial's mc version matches the one you're developing with.

    Posted in: Modification Development
  • 0

    posted a message on Receiving a Fatal Error in Forge, BUILD FAILED > java.lang.NullPointerException (no error message)

    Have you tried doing "echo %JAVA_HOME%" or whatever it is on windows, I forget. See if that's set to the right place? I had similar nondescript errors and it did turn out to be missing the JDK, just had JRE.

    Posted in: Modification Development
  • 0

    posted a message on Scripting Mods?
    Quote from Meister_Lucas»

    <snip> Im saying this to u because i can see u have experience with modding, and I, as a starter, would mess up with the idea and give up.


    Well you're never going to become an experienced modder if you don't start modding. The first thing I ever did was make a bush that grew apples and that took me a while, cause I had no experience and was starting from square one. But that's how you learn. If your idea is too big to tackle, try starting simpler to figure the basics out.

    Posted in: Modification Development
  • 0

    posted a message on ItemStack NBT not syncing
    if (!event.world.isRemote) {

    You have that, so you're only doing it for the server. You either need to force an update, or just do it for both client and server.

    Posted in: Modification Development
  • 0

    posted a message on Is there a way to remove entities completely: I.E no death animation, no sounds, etc., [SOLVED]

    Not sure how cleanly it would work, but can you set the rotation to 0 in the onUpdate method?

    Posted in: Modification Development
  • To post a comment, please or register a new account.