• 0

    posted a message on adding a custom model to a throwable entity

    Ok wow, I guess I didn't look at the op too hard :P. First you will need to register your renderer using RenderingRegistry#registerEntityRenderingHandler in your client proxy. In your renderer class, set the type of the model variable to the class for your custom model. Then, in the blank space in your doRender method, add the model#render to make the renderer actually render your model.

    Posted in: Modification Development
  • 0

    posted a message on adding a custom model to a throwable entity

    [deleted]

    Posted in: Modification Development
  • 0

    posted a message on How to create a custom armor keybind

    Go ahead and register your custom keybind and inventory. Then make an event handler with an event that will fire every time a key is pressed. Check if the key is your keybind as well as if the armor piece in the leggings slot of the player is your custom leggings. If true, have the game open your inventory. I'm not going to get into the nitty-gritty of the specific code for each step, but there are lots of great tutorials that do.

    Posted in: Modification Development
  • 0

    posted a message on hasItemStack

    hasItemStack(Item.WHATEVER) is a boolean method used by the player's inventory to see if the player has an item stack containing that item. To use it in an event, it would look something like event.player.inventory.hasItemStack(Item.WHATEVER). In some events, there is a generic entity, not necessarily a player. In this case, check if the event.entity is an instance of EntityPlayer and then cast it.

    Posted in: Modification Development
  • 0

    posted a message on Problems with Throwable Entities

    Alright, this brought up a few more problems, but they are all fixable.


    1) You are going to want to set up a keybinding system for your mod to properly allow for key presses. Registering keybinds through forge allows players to customize their keys.


    2) A keybind is only registered client-side. The entity MUST also be thrown on the server, which means you will need to setup a packet system for your mod to send messages between the client and server. If you find a decent tutorial, it's honestly not all too complicated. Just send a packet to the server when the key is pressed, that way it knows what is going on as well. As it is currently setup, your entity is only spawned in client-side.


    3) To actually fix the entity falling flat, you are going to use the setHeadingFromThrower(blah blah) method. This is used to set the direction and velocity with which your entity will be thrown from the player. Your code would look like this. All uppercase parameters can be replaced with the number you actually want.

    EntityStaticAttack entity = new EntityStaticAttack(worldIn, playerIn);
    entity.setHeadingFromThrower(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0, LAUNCH_VELOCITY, INACCURACY);
    worldIn.spawnEntityInWorld(entity);
    Posted in: Modification Development
  • 0

    posted a message on Problems with Throwable Entities

    First things first, let's start with the entity falling strait to the ground. Can you post the class where the entity is spawned in?

    Posted in: Modification Development
  • 0

    posted a message on Register Mob Types

    What do you mean by different types of mobs? Do you have one mob with multiple variations which you would like to register?

    Posted in: Modification Development
  • 0

    posted a message on [MC 1.10][v2.0] World Tools - A mod to speed up building in creative! • Version 2.0 released 2/5/2017

    World Tools v2.0 released. See OP for details.

    Posted in: Minecraft Mods
  • 0

    posted a message on [MC 1.10][v2.0] World Tools - A mod to speed up building in creative! • Version 2.0 released 2/5/2017

    Sorry for the late replies:

    Quote from hotrod747»

    is there a way to fix this green "glow"

    It is getting on my nerve



    What version are you using? This was an issue in older versions of the mod but not the newer versions.

    Quote from AshUzumaki»

    I like your mod better when I just used the tools to do everything, instead of having to use commands. It was much simpler to figure out and it took less than five minutes for me to understand it. I only understand half of the current version and I don't like the use of commands. And I don't even know how to erase stuff either. I just had to do two clicks and then use the erase tool and I'm done. This was the only world editing mod I've been able to understand how to use and now it's harder to use. I hope you consider changing it back.



    I haven't worked on the new update much but I am going to start work on it again. Anyways, I tried using my own mod for personal projects and realized I hated it too. The hard part is getting complex functionality with simple controls, but the new version will rely very little on commands. I am also considering adding in-game hints so you know what buttons to press to do something (i.e. when holding the cursor, it will say, "Left click to place first position" and "Right click to place second position").

    Posted in: Minecraft Mods
  • 0

    posted a message on Making a throwable object drop if it doesn't hit a target

    Do you want to make the entity stick to an object, then return to the player's inventory when they walk near (like an arrow) or make it drop as an item (like when you break a block) onto the ground as soon as contact is made? The latter is simpler, but the former isn't impossible.


    Also, if you could post any work you have done so far, it would make helping a lot easier.

    Posted in: Modification Development
  • 0

    posted a message on [MC 1.10][v2.0] World Tools - A mod to speed up building in creative! • Version 2.0 released 2/5/2017
    Quote from Bennjo_117»

    Is there a way to rotate a copied section?


    Not yet, I hadn't thought of that.
    Quote from Ryanm1447»

    When I select to points with the cursor and try to remove all of the block by typing /wt set state Minecraft:air nothing happens what am I doing wrong?


    "/wt set state <state>" will only set the block state you wish to work with but the command itself will not affect the world at all. After that, you need to type "/wt fill" to fill the selected area with the set state.
    Posted in: Minecraft Mods
  • 1

    posted a message on [MC 1.10][v2.0] World Tools - A mod to speed up building in creative! • Version 2.0 released 2/5/2017
    Quote from TheFeldi»

    Please, do the item change thing. You will get so much fame. Look at AllUWant.



    I got a prototype of the item editor working, but it still has some kinks in it. I kinda lost steam before I ever got it pushed out though. Maybe in the near future though I can just get that last update out, because it had several other neat features that I am quite excited about.

    Posted in: Minecraft Mods
  • 0

    posted a message on [MC 1.10][v2.0] World Tools - A mod to speed up building in creative! • Version 2.0 released 2/5/2017
    Quote from ala_king»

    I'm confused. How does the hammer replace the eraser? I can select areas and copy and paste them, but I cant figure out how to build or delete areas.


    Use the hammer to select a block type, then use "/wt fill" to fill the selected area with the selected block type. You can use the hammer on the air or "/wt set state minecraft:air" to select air. Then when you fill the area, it will be filled with air, effectively doing the same thing as the eraser. If you use the hammer on, for example, stone, and use "/wt fill" then the area will be filled with stone, doing the same thing as what the hammer used to do. The only reason I changed this was to make block selection more compatible with the brush tool. I hope it's not too confusing.
    Posted in: Minecraft Mods
  • 0

    posted a message on [MC 1.10][v2.0] World Tools - A mod to speed up building in creative! • Version 2.0 released 2/5/2017
    Quote from datderpina»

    The brush isn't working for me :((


    Sorry, but without more information, I can't help.

    Posted in: Minecraft Mods
  • 0

    posted a message on Need help syncronizing a value between the client and server.
    Quote from jabelar»

    this
    is a really good question that shows you've reached a good point in
    your understanding of the Minecraft architecture -- i.e. that the client
    and server can be running in separate JVMs and therefore sync can be a
    problem.


    There are already a couple built in methods you can extend for syncing:

    1) the DataWatcher. This is limited in what can be sent (simple values, not really NBT), but is simple to use.

    2)
    the SimpleNetworkWrapper packet system. This allows you to send
    anything that you can put into a Java ByteBuf stream. Furthermore, there
    is a ByteBufUtils class that allows you to read and write NBT directly
    to the ByteBuf. You can sync in both directions.


    I suggest you
    learn how to use packets, since they will definitely make you a more
    powerful modder. I have a tutorial here:
    http://jabelarminecraft.blogspot.com/p/minecraft-forge.html



    I followed the "Forge Documentation of the SimpleNetworkWrapper packet system" you linked in this tutorial, along with your information of the ByteBufUtils, and it worked just like how I needed it to. Thank you!

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