The Farmer Was Replaced Karotten-Code — pflügen, pflanzen, gießen
Neu für 1.0+. Karotten brauchen Soil. Kein Samenhandel: `plant()` zieht Heu und Holz. `trade()` entfernt.
1.0-Karotten-Regeln
- Nur auf Soil pflanzen. `till()` auf Grassland.
- Kein Carrot_Seed. Kosten via `get_cost(Entities.Carrot)`.
- Kein trade(). Gießen: `use_item(Items.Water)`.
- `get_water()` 0–1, bis 5× Wachstum.
Karotten-Schleife (geprüfte 1.0-APIs)
python
while True:
if can_harvest():
harvest()
if get_ground_type() != Grounds.Soil:
till()
# Optional: only plant if you can afford it
cost = get_cost(Entities.Carrot)
can_pay = True
for item in cost:
if num_items(item) < cost[item]:
can_pay = False
if can_pay:
plant(Entities.Carrot)
if get_water() < 0.75:
use_item(Items.Water)
move(East)
if get_pos_x() == 0:
move(North) Ohne Costs-Unlock den cost-Block löschen und direkt plant() aufrufen.
Nächste Kulturen
Kürbisse brauchen Soil und Karotten; ~20% Dead_Pumpkin. Bäume brauchen Schachbrett.