Jump to content

Spoonail

Vintarian
  • Posts

    5
  • Joined

  • Last visited

Community Answers

  1. Spoonail's post in Recipe Outputs being Given Durability (not intended) was marked as the answer   
    The behavior averaging durability can be disabled from the recipe json.
    Add "averageDurability": false to the recipe.
  2. Spoonail's post in Request for help regarding how to generate food. 请求帮助,关于如何生成食物。 was marked as the answer   
    I made a few changes and got it working:
    In `StartServerSide`:
    The handler and a method for Ground Storage:
    Changes and reasons:
    - Spawning the pot at fixed position was hard to debug, so changed the command to spawn it at player pos +3z
      - So after running the command, look south to find the spawned pot
    - Getting block/item by raw ID doesn't work well. Use it with `AssetLocation` always.
      - Actually `GetBlock(1093)` gave me one of variants of brick blocks
    - Meat stew requires at least 2 meat, so changed the ingredient to 2 red meat and 2 carrots 
    - To set meal into a pot properly, you need to call `IBlockMealContainer.SetContents`
    - In recent VS versions, meal containers are placed in Ground Storages instead of being placed directly, so changed the code to follow the way
      - Create a pot stack, set meal content to it, create a Ground Storage, place the gs and set the pot stack into it
  3. Spoonail's post in [ask for help]Is there any way to turn the BGM on or off by command?[寻求帮助]请问有没有办法通过指令来开关BGM? was marked as the answer   
    You can set any client config value via the `.clientConfig` command, including the bgm volume (`musicLevel`):
    .clientConfig musicLevel 0 .clientConfig musicLevel 30 If you want short-hand commands, you can define custom commands in your mod's `StartClientSide` and use `ICoreClientAPI.TriggerChatMessage` to call `.clientConfig`.
    That should look like:
    public override void StartClientSide(ICoreClientAPI api) {     api.ChatCommands         .Create("notbgm")         .HandleWith(args => {             api.TriggerChatMessage(".clientConfig musicLevel 0");             return TextCommandResult.Success($"Current music level: {ClientSettings.MusicLevel}");         });     //... }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.