Sign in to follow this  
konsul

Meat

Recommended Posts

Now in the game if you kill a bull, you get 1.5 kg of meat. It’s ridiculous. Chicken, not a bull)) Maybe there is a mod that increases the weight of the mayas? If not, which method is responsible for this?

Share this post


Link to post
Share on other sites
              toCreate.setWeight((int)Math.min(corpse.getWeightGrams() * 0.5F, meattemplate.getWeightGrams() * creaturetemplate.getSize()), true);

on face value that looks like it should be good, until you realize that corpses weigh pretty much the exact same amount, with some exceptions. So yeah it is possible to fix it with a mod. the getsize() for creature is probably what is meant to make the meat weigh more, size is a value of 1-5

    if ((aCentimetersHigh > 400) || (aCentimetersLong > 400) || (aCentimetersWide > 400)) {
      size = 5;
    } else if ((aCentimetersHigh > 200) || (aCentimetersLong > 200) || (aCentimetersWide > 200)) {
      size = 4;
    } else if ((aCentimetersHigh > 100) || (aCentimetersLong > 100) || (aCentimetersWide > 100)) {
      size = 3;
    } else if ((aCentimetersHigh > 50) || (aCentimetersLong > 50) || (aCentimetersWide > 50)) {
      size = 2;
    } else
      size = 1;

bull is 250, 

sheep is 50

rift caster is 150

hellhound is 100

That should give you an idea of how much the weight should vary, if the code is working then a bull should be factor of 5 and sheep factor of 3, so bull should have 5/3 the weight of sheep meat. so if bull meat weighs 1.5kg as you say then sheep should weigh 0.9 kg and hell hound 1.2 kg.

  • Like 1

Share this post


Link to post
Share on other sites

Hi! Can i ask you to help me also to find server java method what i can bind/hook like this  - CtMethod.getMethod( name: "OUR METHOD NAME" ) , and add/replace it with my own java code logic, for return corect values of droped meat from corpse ?

I try to find some API documentation of server java sources but did not. So can you give me advice how to know method name what i must to hook and edit for working with droped mead values ?

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this