Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/26/19 in all areas

  1. I thought your main problem was fixed... If you want to implement the behavior on a custom item, just override Item#onItemUse.
    1 point
  2. *Person looks at the two log. *Person finds one line being the same while the rest can potentially be totally different. *Person gets frustrated and accuses others who tell him "the error might not be the same" cannot read. Balanced, like all things should be.
    1 point
  3. Personally I'd go with the entity, no questions asked. Since you're shooting the fireball anyway, it sounds like the perfect candidate for something that extends EntityProjectile. You'll get all the shooting/collision logic for free, as well as not needing to do any manual rendering, transformations, etc.
    1 point
  4. Unrelated things: https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/util/ModUtil.java#L64-73 ...You do know that setRegistryName and setTranslationKey both return the object, right? You can totally do this: Block b = new BlockWhatever().setRegistryName(...).setTranslationKey(...) Ditto items. Or you could do it right in the constructor where you're already calling setRegistryNames...The only real value this has is setting the translation key to the registry name, but because of where you're calling this, there is no reason why you need these generic overloaded helper functions, except here where, where it's still unneeded because of the above. You also return the entry object despite doing nothing with it, so what was the point? Ditto setCreateiveTab. https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/util/ModUtil.java#L135-141 Why. Seriously, why did this need a method call? https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/items/treasure/SmallRuby.java#L12 Classes like this....don't need classes. Seriously, you gained fuck and all with this class. And what's this? Didn't like your mod util class this time? Just use new Item() https://gitlab.com/LaDestitute/Spelunkcraft/blob/unstable/src/main/java/ladestitute/spelunkcraft/proxy/CommonProxy.java CommonProxy is stupid. Anything that would go here should go in your main mod class. Not that you even call these methods anyway. Speaking of the proxy, and sided things, you have a client folder. And a server folder. Why are your proxies not in these folders but instead in a special "proxy" folder? Organize by groups, that's what its for. Everything that's client side goes in the client folder the client proxy is client sided! It goes in the client folder.
    1 point
  5. With the correct Block#onBlockActivated method signature.*
    1 point
  6. Write a method that search for wood nearby, and use path finder to navigate your entity toward to position. Destroy the wood blocks and add the wood to the entity's inventory. Navigate the entity back to the start position with the path finder. I would suggest searching up how entity AI and path finding work. Don't just copy code you find from the internet; instead, learn how the code work and write it yourself. You will learn more this way.
    1 point
  7. I...half agree. I've begun to dislike such people for just teaching people to abuse inheritage and using static registry (which is fine if you're a beginner and doing a small-scale mod that just adds like a dozen items or something) but in general, static registry is...NO BAD! It took me a while up to now to shake those habits. However, I am of the opinion if you ignore the inheritage with custom-classes and static registers, such tutorials are okay...to maybe get your foot in. Even just for simple stuff like ore or structure gen. But you should also learn from written/text tutorials, Minecraf'ts src code (even if ...ahem, Mojang is "lets use deprecated methods, trolololol!" and "if it ain't broke, don't fix or improve it") or any available src code or open source code. Open source code is wonderfuuul to learn from.
    1 point
  8. No. HarryTalks is one of the worst tutorials out there as it teaches you bad practices and cargo-cult programming. This is a common problem of youtube tutorials. Personally, I would recommend text-based examples such as https://github.com/TheGreyGhost/MinecraftByExample and https://github.com/Cadiboo/Example-Mod, both of which explained in details about what everything does.
    1 point
  9. Personally I use custom packets more because I find it easier to understand what's going on when I've created it from scratch, rather than adapting vanilla things.
    1 point
×
×
  • Create New...

Important Information

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