• 0

    posted a message on How to get custom trees to drop custom apples

    I thought I told you to use the quantityDropped method override, and inside there just use an if to check if the random parameter's nextInt(whatever chance) is a certain number, and drop a certain number. So for example


    int chance = 5;

    int randomResult = random.nextInt(chance);

    if(randomResult == 0) return ModItems.SOME_ITEM;

    else if(randomResult == 1) return ModItems.SOME_OTHER_ITEM;

    else if(randomResult == 2) return ModItems.YOU_GET_IT;



    The quantityDropped method has a random passed into it so you can use that.

    Posted in: Modification Development
  • 0

    posted a message on Variant model error

    Well, yeah, you told minecraft to search for ore_$dimension_$variantname and the only blockstate you have for that is just ore_underworld.


    Also, classes should be always super camel case. LikeThis. AlwaysLikeThis.

    Posted in: Modification Development
  • 0

    posted a message on looping through every block in all chunks?

    So just make players explore. Just like with the stronghold


    Edit: Speaking of that, why not just do what the stronghold code does and just save the coords of your block that's generated. And that way it knows where it's at. Much faster.

    Posted in: Modification Development
  • 0

    posted a message on looping through every block in all chunks?

    umm...use the world chunk events? Wait, not JUST the loaded ones? That's gonna drastically bring down performance. Cause the loaded chunks are already loaded, no need to do anything extra cause they're already there, you just gotta loop through the blocks in the chunk. However, if you loop through all the loaded and unloaded chunks, you'd have to somehow cache the chunks somewhere (like they already aren't) or you gotta create some kind of nbt utility to load the chunks into memory then extract the block list from the chunk then cache that, then unload the chunk, then loop through the cached list, then do what you want, and then nullify the list and let gc delete the list. That is terribly counterproductive and don't even get me started on how complicated that code would be and how unnecessary that would be to. Just loop through the already loaded chunks and call it good. Maybe like a metal detector.

    Posted in: Modification Development
  • 1

    posted a message on How to get custom trees to drop custom apples

    You need to set the drop item of the leaves to be a chance of dropping your custom apple by using an if on a random number and if it matches a certain number or range of numbers then drop the apples (with amount if desired)


    //getItemDropped method

    return ModItems.CUSTOM_APPLE


    //quantityDropped method

    return random.nextInt(5);


    This is in 1.12.2 btw, so I don't know what version you're in. It could be slightly different for you but relatively the same.

    Posted in: Modification Development
  • 1

    posted a message on Educational Open Sourced API


    I am currently working on an API that is showing how you can do things in forge, done as an API in case anybody wants to use it, and doing it very simply and, yes, done in Kotlin. Right now, all that there is are easier item effects. The project is currently named Easier Effects but that'll change once there is more content to it. You can create effects and apply them to items. This is mostly targeted towards people that are new to modding and would like to be guided through doing things with items. These effects can be applied currently to armor and held items. This will be extended to blocks and entity AI's, and anything else suggested. If you wanna see how it looks right now and more information, there's a readme at the github repo here: https://github.com/AlexCouch/easier-effects-educational


    This is to solve the complication that a lot of good mod projects have when being used as examples. If you would like to contribute, then let me know. You can use java in it if you want, it works all the same! :P


    No, this is not really meant to be used in practical situations, mostly to guide people into creating things by creating tests of how to use the simplified features of this API.



    While writing this just a bit ago, I realized that I can do a lot more by simplifying a lot of things in modding for newer people. So I have decided to rename the project to Rated E for Everybody API. This way, if someone wants to learn how to do certain things in minecraft forge, then they can use this api to guide them along with whatever they are wanting to do. Do chat related stuff, events, entities, AI, capabilities, items, itemstack related stuff, subitems, blockstates, etc. There is librarian lib but that's for practicality. This is for pure educational purposes.


    The repo is here: https://github.com/AlexCouch/Rated-E-For-Everybody-API

    Posted in: Modification Development
  • 0

    posted a message on My mod not showing up in the mods list?
    Quote from FunnelVortex»

    I actually had to have the override return false.

    Now that is a thing of beauty! :)


    Yeah that's right! It's false! LOL but yeah btw if you have any more questions, be sure to come into mdc discord server here.
    Posted in: Modification Development
  • 0

    posted a message on My mod not showing up in the mods list?
    Quote from FunnelVortex»

    Thanks. By the way I did import a 3D model I made, but now I have the issue of the ground being invisible beneath it.


    You need to override a method from the Block class called isOpqueCube and return true to it.
    Posted in: Modification Development
  • 0

    posted a message on [1.11.2] [Forge] Minecraft Forge Modding Tutorials - UP TO DATE - IN DEPTH - BEGINNER FRIENDLY
    Quote from Brock_Peters»

    Hello, I am using Debian, and I was wondering if IntelliJ does work here. I saw it was like a .gz file, and I never saw one, so I don't know.




    Hmm...not sure tbh...you're gonna have to google your way through that one...sorry!

    I'm trying to make this be in its own post but mcforums won't let me. It keeps merging the quoted reply to brock with this one. So whatever, if it merges I don't care anymore. Here it is:


    Well, I got a new tutorial out. This time it's covering more than modding. This time it's using the Kotlin programming language to make a mod. I run through a lot of new concepts that may seem really foreign to many. I try to explain as much as I can. If I missed anything or if I explained something wrong, then please let me know so I can fix it!


    Setting Up Forge With Kotlin

    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on My mod not showing up in the mods list?

    No you just put it in your models directory like always. It contains detailed information about the faces and the textures on what faces and the texture for what where and how and whom and so on and so forth

    Posted in: Modification Development
  • 0

    posted a message on My mod not showing up in the mods list?

    I agree. That's why I use kotlin cause I can just put it in the same file above the class. Lemme show you.


    private const val modid = "test"
    private const val name = "test"
    private const val version = "1.0"
    
    @Mod(modid=modid, name=name, version=version, modLanguageAdapter = "net.shadowfacts.forgelin.KotlinAdapter")
    object CoresTest

    And that's it! :D But that's just me flaunting how great kotlin is (I get a lot of flack for it). Anyways, back to your regularly scheduled program!


    I'm glad you got it figured out! I actually totally skimmed over your modid and never even thought about it. I'm so used to seeing modid's being all lowercase that I never even thought about it!

    Posted in: Modification Development
  • 1

    posted a message on My mod not showing up in the mods list?

    I think I see your problem. You're trying to give metadata to a class (aka, an annotation) using constants that are constructed in said class, and I'm not sure if the annotation is applied during or after class construction. It's always good to have those constants outside of said class. I use kotlin to construct my mods and it's literally like 3 or 4 lines of code depending on what you're doing. But I digress. You should definitely create a second class outside of the main mod class and put those constants like the name, modid, version, proxy locations, etc into said class.

    Posted in: Modification Development
  • 1

    posted a message on My mod not showing up in the mods list?

    Check in the console. There should be something about it loading. Check at the top for references to your mod name.

    Posted in: Modification Development
  • 0

    posted a message on how much damage/energy breaks the game?

    Go track it down. Go find the maths yourself. Report it back to us. Use your IDE's type viewing tools (CTRL+T on Eclipse, CTRL+O on Intellij (not sure tbh cause I'm on mac >.>)) and find where you think it is, look at the maths, and report back. I'll be waiting.

    Posted in: Modification Development
  • 0

    posted a message on [1.11.2] [Forge] Minecraft Forge Modding Tutorials - UP TO DATE - IN DEPTH - BEGINNER FRIENDLY

    Alright, so here's the thing. I know I said a while ago that I'd get some other tutorials out like trees and structures and finish my entity tutorials as well but I've been dealing with a lot of personal issues including getting school to work out. I'm starting college to head for an anthropology bachelor's degree so I have to make sure that my grades are good. Starting the 3rd of January, 2018, I'll be attending school all day mondays and wednesdays, and if I have any homework I'll be doing them on my freetime. So for the remaining time I will also be taking care of a puppy at home but with my mom going back to school as well and searching for a job she will be helping out too so until she is working again and going to school I will be doing as many tutorials as much as possible. I will be making videos as much as possible on a youtube channel managed by the staff of Mod Dev Cafe. If you would like a community to go to show off your creations and to ask questions, then please come into the Mod Dev Cafe server! Ask all the questions you have and we will be sure to help you out, as well as making tutorials for everybody. But none of this "how to make a block/item" crap. That's been so overdone. How about structure generation, using json for whatever, gui's, tile entities, capabilities, etc. If you don't see anything within a week come into the server and ask about it.


    Here is the link to the discord server: https://discord.gg/T5MGNBB

    Posted in: Mapping and Modding Tutorials
  • To post a comment, please .