Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/30/17 in all areas

  1. Indeed, I saw that some time after posting in this thread. That was news to me, since I'd previously thought that init was the de-facto standard phase for Ore Dictionary registration. Even with this recommendation, I suspect a lot of mods are still doing things the old way (i.e. registering Ore Dictionary entries in init).
    2 points
  2. Actually diesieben07 a while back gave an idea on how to do this (intercept vanilla packets). I copied the info into a tutorial tip here: http://jabelarminecraft.blogspot.com/p/minecraft-forge-modding.html It might be out of date and looks like a bit of work, but worth looking at as a possible approach. By the way, I'm not sure an event would be a good idea because I think there are many packets per tick and so would be firing continuously and cause performance problems.
    2 points
  3. Use Minecraft's Structure Blocks to save a structure to NBT, which you can then use in code to load the structure. Create a new Template instance with the resource location of your structure.nbt file, and call Template#addBlocksToWorld to spawn the structure. You can do this in your WorldGenerator class.
    2 points
  4. You can only use an array as a fully-defined variant, you can't use it as one of the values of a property. It might be best to register an IStateMapper that uses a different blockstates file for each value of the type property, this way you can define the textures in the defaults section of each file and avoid repeating them for the variants with multiple possible models.
    1 point
  5. To open a class by name, use Navigate > Class (Ctrl-N) in IDEA or Navigate > Go To > Type... in Eclipse.
    1 point
  6. He already explained what he's trying to do, he just want to randomly pick from all registered potions and apply it when a certain food item is eaten. So I think he should use the getValues() then pick random number based on the list size and get the element based on that index.
    1 point
  7. you aren't registering the entity itself, only a renderer for it.
    1 point
  8. No, that is not what that is for. What that is for its when we should delete the tile entity and all of its data and create a new one.
    1 point
  9. Updating mod versions can be a bit of a pain, but is usually possible so long as you're a decent Java programmer. You need to be good at Java because you will have to hunt for equivalent functionality which sometimes has been significantly changed. Also sometimes little things like renaming methods happens which can be a pain to track down. I do give some general advice on updating mods, as well as some specific tips for updating some things in my tutorial here: http://jabelarminecraft.blogspot.com/p/minecraft-modding-updating-your-mod.html My tutorial only has specific tips up to 1.10 (still working on learning the 1.12 stuff myself) but those will still apply to you as steps along the way. Hope it helps.
    1 point
  10. What is with the rash of people posting screenshots of their launcher? All of which contain nothing to do with the issue. Post your fml log from the logs folder. Not getting the hashes is normal, Mojang doesn't follow maven standards and we've opted out to that so its intentional for them to get these 'errors' but the game will still work.
    1 point
  11. I looked at this mod, and it uses a lot of old methods that aren't in 1.12, so you would need to entirely recode the mod to make it 1.12. Sorry!
    1 point
  12. No, because now I need your RegistryHandler class. #ShouldHaveSeenThisComing
    1 point
  13. Post your code and the exception using Gist/Pastebin. What do you need the player for? Why does it need to be an AbstractClientPlayer specifically?
    1 point
  14. Well, my EntityJoinWorldEvent fires BEFORE the Attach capability event. That's where it fails. I want to update my client by sending them a packet. But if the packet attempts to update before the capability is attached to the client, there's not much use. I can try to use the gather capabilities event. But if you have an implementation of a packet where it successfully updates the client side after logging in using EntityJoinWorldEvent I'd love to see how you did it. Fixing something I did wrong would be easier than trying to workaround using tick handlers Sorry if the spelling sucks. I'm typing from my phone still. Update: I created a playerTickHandler with a few booleans. One boolean from my GuiHandler that draws the actual element that turns to true when things aren't properly loaded on the client side. Then a boolean near the Eventhandler to make sure that the load isn't called a second time. This ensures that whenever my capabilities DO exist (Or my GUI couldn't access them) the tickhandler updates the player once, giving them the proper resources. Edit: This only works in single player now that I test it. Back into the fray I go. Edit: Made a variable in my GuiHandler using a ClientConnectedToServerEvent to make sure that the client would request an update every time it connected. Then I created a simple packet from the client to the server to ask for an update, on which the server send back a packet with the relevant, updated information. No tickhandler required, no funky workaround. I'm quite frankly not sure why I didn't try this in the first place.
    1 point
  15. The main class does nothing but pass the FML lifecycle events to the proxy. If the proxy is likewise useless, then you aren't registering your entity at all.
    1 point
  16. Well, your main class is useless, nothing of any worth is there (oh, you need it, it just doesn't help solve your problem what so ever because it forwards everything to the proxy classes which you didn't include). You have a registerGlobalEntityID() method in your entity class, which is both useless (it does nothing) and implies you're doing things Wrong. You should not be using global IDs. Third, /summon Entity303 isn't correct. This implies the default domain, minecraft, which your mod is not a part of. You would need /summon MODID:Entity303 using whatever your MODID actually is. Fourth, this is a forum, not a chat room. 37 minutes is hardly people ignoring your thread. Jesus, wait a bit.
    1 point
  17. You go to minecraft.curseforge.com, create an account, create your project, and then upload the built mod jar.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.