Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
EnTro

Java code profiling: Expensive chicken nesting AI code

7 posts in this topic

I recently started doing some java code profiling in the hope to find some bottlenecks in the code that can be optimized. For those that don't know what code profiling means, simply put: it shows which part of the code takes most time to run.

 

First observation:

 

Having only 16 chickens in the area, the function TFC.Entities.AI.EntityAIFindNest.isSittableBlock() takes up between 2 and 12% of the CPU load.

 

This is of course very high, because with about 100 chickens, it would start overloading the server.

 

I hope this helps Bioxx and Dunk improve the efficiency of the TFC code and I will post other issues when I observe them.

1

Share this post


Link to post
Share on other sites

eh, it's mostly just a modified version of the code that makes ocelots sit on furniture, so you can go complain to mojang while you're at it.

0

Share this post


Link to post
Share on other sites

Not sure if I expressed myself wrongly here, but this is absolutely not a complaint. I just want to provide info that you could use to improve TFC. If you're not interested in this kind of info, let me know and I will not bother you with it.

 

I think you all did an amazing job on the mod :).

 

Edit: and perhaps you can even improve the Mojang code

2

Share this post


Link to post
Share on other sites

eh, it's mostly just a modified version of the code that makes ocelots sit on furniture, so you can go complain to mojang while you're at it.

 

That's from vanilla MC? I thought ocelot behaviour was bugged or something. When i played vanilla last time, they kept sitting on my double chests frustratingly. 

1

Share this post


Link to post
Share on other sites

indeed. Like REAL cats, they're designed to sit on any thing warm or that you need to not have cats on :)

0

Share this post


Link to post
Share on other sites

BTW, dunk, are you planing on giving us some kind of feline for TFC?

0

Share this post


Link to post
Share on other sites

Dunk apparently hates cats.. at least that's what he keeps telling me when I suggest adding ocelots to the jungles.

0

Share this post


Link to post
Share on other sites