1. How does one spawn a fully grown corn, hemp or even a tree?

    I can spawn corn seedlings with this code:

    Code:
                var prefab = "assets/prefabs/plants/corn/corn.entity.prefab";
                var position2meters = GetGroundPosition(player.transform.position + (player.eyes.BodyForward() * 2));
                BaseEntity entity = GameManager.server.CreateEntity(prefab, position2meters, default(Quaternion), true);
                entity?.Spawn();
    
    I have tried hemp and another type of corn from the plants sectoin...

    assets/bundled/prefabs/autospawn/collectable/hemp/hemp.prefab
    assets/prefabs/plants/corn/corn.skin.4.fruiting.prefab

    Thank you
     
  2. You should be able to change the state of the plant to Fruiting and do a networkupdate if I'm not mistaking, or you can call the private method BecomeState. You will need to use reflection to do this. I suggest having a look at PlantEntity in Assembly-CSharp.dll using a decompiler.

    Code:
    private void BecomeState(PlantProperties.State state, bool resetAge = true)