-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Minecraft Java Edition 1.21.x | Multiplayer-Safe | Pure Datapack | v1.0.6
Bu sayfa AME'nin kurulumunu, tüm API'lerini, gelişmiş kullanım desenlerini, hazır örnekleri ve sorun giderme rehberini tek yerde sunar.
- Kurulum & Gereksinimler
- Storage Mimarisi
- Tick Sistemi & Flag Kontrollü Subsistemler
- API Referansı
- Predicate Listesi
- Item Modifier & Loot Table Şablonları
- Gelişmiş Desenler
- Hazır Örnekler
- Sürüm Notları & Breaking Changes
- Sorun Giderme
| Gereksinim | Versiyon |
|---|---|
| Minecraft Java Edition | 1.21.1 veya üzeri |
| Sunucu türü | Vanilla, Paper, Fabric (Carpet ile) |
| Datapack format | 48+ (otomatik algılanır) |
AME, MC sürümüne göre otomatik overlay seçer:
| Overlay | Pack Format | MC Sürümü | Fark |
|---|---|---|---|
_pre_1_21_4/ |
48–57 | 1.21.0–1.21.3 |
clickEvent/hoverEvent + hide_tooltip
|
-1_21_4/ |
48–61 | 1.21.0–1.21.4 |
clickEvent / tooltip_display
|
| (base) | 48+ | 1.21.x |
click_event/hover_event, tüm API |
1_21_6/ |
80–94 | 1.21.6+ |
macro:dialog/ API aktif |
sunucu/world/datapacks/
└── advanced_macro_engine/ ← buraya koy
├── pack.mcmeta
├── data/
├── -1_21_4/
├── 1_21_6/
└── _pre_1_21_4/
/reload
# Başarılıysa: [AME] Advanced Macro Engine v1.0.6 yüklendi.
# Opsiyonel: debug tag ekle
/tag @s add macro.debug
/function macro:debugmacro:engine ← Kalıcı veri (/reload'da silinmez)
├── global
│ ├── version: "1.0.6"
│ ├── loaded: 1b
│ └── tick: <int>
├── players
│ └── Steve { coins:150, level:5, xp:2300, online:1b }
├── queue
│ └── [{func:"mypack:event/end", delay:100}]
├── cooldowns
│ └── Steve { fireball:2460, dash:1870 } ← expiry epoch tick
├── events
│ └── on_join: [{func:"mypack:welcome"}]
├── config
│ └── { server_name:"My Server", max_party:4 }
├── flags
│ └── { pvp_enabled:1b, event_active:1b }
├── states
│ └── Steve: "combat"
├── schedules
│ └── autosave: {func:"mypack:save", interval:200, fire_at:2700}
├── trigger_binds
│ └── [{value:1, func:"mypack:menu/open"}]
└── log_display
└── [{text:"...", color:"green"}, ...] ← max 30 giriş
macro:input ← Fonksiyona gönderilen parametreler
macro:output ← Fonksiyondan dönen sonuç
Bir fonksiyon içinden başka bir modülü çağırırken macro:input'u korur:
function macro:lib/input_push # mevcut input'u kaydet
data modify storage macro:input value set value 144
function macro:math/sqrt with storage macro:input {}
# output.result → 12
function macro:lib/input_pop # input'u geri yüklemacro:tick beş bağımsız subsisteme bölünmüştür. Her biri macro.Flags scoreboard'undaki bir flag ile açılıp kapatılabilir.
| Flag | Kapsadığı sistemler | Varsayılan |
|---|---|---|
#m_time |
Epoch sayacı, $tick artışı |
1 (aktif) |
#m_queue |
lib/process_queue, lib/schedule
|
1 (aktif) |
#m_player |
Menü, run, trigger dispatch | 1 (aktif) |
#m_hud |
Otomatik progress bar (actionbar) | 1 (aktif) |
#m_admin |
Debug & admin sistemleri | 1 (aktif) |
# Bir sistemi devre dışı bırak
/scoreboard players set #m_hud macro.Flags 0
# Flag toggle ile
data modify storage macro:input system set value "hud"
function macro:flag/toggle_system with storage macro:input {}
# Tüm sistem durumlarını göster
/function macro:flag/list_systemsKural: Her fonksiyon
function macro:<path> with storage macro:input {}şeklinde çağrılır.
| Fonksiyon | Input | Output | Açıklama |
|---|---|---|---|
player/init |
{player} |
— | Oyuncuyu başlat, varsayılanları yükle |
player/set_var |
{player, key, value} |
— | Değişken yaz |
player/get_var |
{player, key} |
result |
Değişken oku |
player/has_var |
{player, key} |
result:1b/0b |
Değişken var mı? |
player/del_var |
{player, key} |
— | Değişkeni sil |
player/add_default |
{player, key, value} |
— | Yoksa varsayılan yaz |
player/add_to_var |
{player, key, amount} |
— | Sayısal değere ekle |
player/clamp_var |
{player, key, min, max} |
— | Değeri aralığa sıkıştır |
player/copy_var |
{player, from_key, to_key} |
— | Değişkeni kopyala |
player/swap_var |
{player, key_a, key_b} |
— | İki değişkeni takas et |
player/transfer_var |
{from, to, key} |
— | Oyuncular arası transfer |
player/increment |
{player, key} |
— | +1 artır |
player/decrement |
{player, key} |
— | -1 azalt |
player/reset |
{player} |
— | |
player/list_vars |
{player} |
— | Tüm değişkenleri göster |
player/get_name |
— | result |
@s'in adı |
player/get_online_count |
— | result |
Online oyuncu sayısı |
player/online_check |
{player} |
result:1b/0b |
Oyuncu online mı? |
# Coin sistemi örneği
data modify storage macro:input player set value "Steve"
data modify storage macro:input key set value "coins"
data modify storage macro:input value set value 500
function macro:player/set_var with storage macro:input {}
data modify storage macro:input player set value "Steve"
data modify storage macro:input key set value "coins"
function macro:player/increment with storage macro:input {}
# Steve'in coins değeri artık 501
# İki oyuncu arası değişken transferi
data modify storage macro:input from set value "Steve"
data modify storage macro:input to set value "Alex"
data modify storage macro:input key set value "coins"
function macro:player/transfer_var with storage macro:input {}Epoch tabanlı (sıfırlanmaz) cooldown sistemi. /reload'da cooldown'lar geçerliliğini korur.
| Fonksiyon | Input | Output | Açıklama |
|---|---|---|---|
cooldown/set |
{player, key, duration} |
— | Cooldown başlat (duration = tick) |
cooldown/check |
{player, key} |
result:1b/0b |
Hazır mı? (1b=hazır) |
cooldown/remaining |
{player, key} |
result |
Kalan tick (0=dolmuş) |
cooldown/clear |
{player, key} |
— | Belirli cooldown'u sıfırla |
cooldown/clear_all |
{player} |
— | Tüm cooldown'ları sıfırla |
# Yetenek cooldown kontrolü ve başlatma
data modify storage macro:input player set value "Steve"
data modify storage macro:input key set value "dash"
function macro:cooldown/check with storage macro:input {}
execute if data storage macro:output {result:0b} run function mypack:skill/dash_busy
execute if data storage macro:output {result:1b} run function mypack:skill/dash_execute
# mypack:skill/dash_execute.mcfunction
execute as @a[name=Steve,limit=1] at @s run effect give @s minecraft:speed 2 3 true
data modify storage macro:input player set value "Steve"
data modify storage macro:input key set value "dash"
data modify storage macro:input duration set value 200
function macro:cooldown/set with storage macro:input {}
# Kalan süreyi actionbar'da göster
data modify storage macro:input player set value "Steve"
data modify storage macro:input key set value "dash"
function macro:cooldown/remaining with storage macro:input {}
# output.result → kalan tickDinamik hook/event sistemi. Birden fazla handler aynı event'e kayıt olabilir; hepsi sırayla çalışır.
| Fonksiyon | Input | Açıklama |
|---|---|---|
event/register |
{event, func} |
Event'e handler ekle |
event/fire |
{event} |
Tüm handler'ları çalıştır |
event/fire_queued |
{event} |
Gecikmeli event tetikleme (race condition önlemeli) |
event/unregister |
{event} |
Event'in tüm handler'larını sil |
event/unregister_one |
{event, func} |
Tek bir handler'ı kaldır |
event/has |
{event} |
result:1b/0b — Handler var mı? |
event/count |
{event} |
result — Handler sayısı |
event/list |
— | Tüm event'leri debug'a göster |
event/clear_context |
— |
event_context'i temizle |
# Handler kaydet
data modify storage macro:input event set value "on_kill"
data modify storage macro:input func set value "mypack:handlers/kill_reward"
function macro:event/register with storage macro:input {}
# Oyuncu öldürme olayında context ayarla ve event'i tetikle
data modify storage macro:engine event_context.killer set value "Steve"
data modify storage macro:engine event_context.victim set value "Alex"
data modify storage macro:input event set value "on_kill"
function macro:event/fire with storage macro:input {}
# mypack:handlers/kill_reward.mcfunction içinde context oku:
# macro:engine event_context.killer → "Steve"| Fonksiyon | Input | Açıklama |
|---|---|---|
lib/for_each_player |
{func} |
Her online oyuncu OLARAK çalıştır |
lib/for_each_player_at |
{func} |
Her oyuncu olarak ve konumunda |
lib/for_each_entity |
{type, tag, func} |
Belirli entity'ler üzerinde döngü |
lib/for_each_list |
{func} |
_felist_input listesinde döngü |
lib/repeat |
{func, count} |
Fonksiyonu N kez çalıştır |
lib/wait |
{func, delay} |
queue_add için alias |
lib/queue_add |
{func, delay} |
Kuyruğa gecikmeli fonksiyon ekle |
lib/queue_clear |
— | Tüm kuyruğu temizle |
lib/schedule |
{func, interval, key} |
Periyodik zamanlayıcı kur |
lib/schedule_cancel |
{key} |
Zamanlayıcıyı iptal et |
lib/schedule_renew |
{key} |
Zamanlayıcıyı sıfırdan başlat |
lib/schedule_if |
{func, interval, key, cond} |
Koşullu zamanlayıcı |
lib/schedule_list |
— | Aktif zamanlayıcıları göster |
lib/schedule_reset |
— | Tüm zamanlayıcıları sil |
lib/throttle |
{func, delay, interval, key} |
İlk çağrıyı çalıştır, interval dolana kadar sonraki çağrıları engelle |
lib/debounce |
{func, interval, key} |
Zamanlayıcı aktifse yeni çağrıyı yoksay |
lib/tick_guard |
— | Aynı tick'te tekrar çalışmayı önle (return 0/1) |
lib/tick_guard_clear |
— | Guard'ı manuel sıfırla |
lib/sync_tick |
— | Global epoch'u storage'a yaz |
lib/input_push |
— |
macro:input'u kaydet |
lib/input_pop |
— |
macro:input'u geri yükle |
# Tüm oyunculara ödül ver
data modify storage macro:input func set value "mypack:daily/give_reward"
function macro:lib/for_each_player with storage macro:input {}
# 10 saniyede bir kontrol yapan zamanlayıcı
data modify storage macro:input func set value "mypack:systems/check_borders"
data modify storage macro:input interval set value 200
data modify storage macro:input key set value "border_check"
function macro:lib/schedule with storage macro:input {}
# HUD'u saniyede max 1 kez güncelle (throttle)
data modify storage macro:input func set value "mypack:hud/update"
data modify storage macro:input delay set value 0
data modify storage macro:input interval set value 20
data modify storage macro:input key set value "hud_update"
function macro:lib/throttle with storage macro:input {}
# Otosave: sık tetiklenirse sadece 1 kez çalıştır (debounce)
data modify storage macro:input func set value "mypack:save/checkpoint"
data modify storage macro:input interval set value 60
data modify storage macro:input key set value "autosave"
function macro:lib/debounce with storage macro:input {}
# 5 saniye sonra lobi'ye gönder
data modify storage macro:input func set value "mypack:lobby/teleport_all"
data modify storage macro:input delay set value 100
function macro:lib/wait with storage macro:input {}| Fonksiyon | Input | Output | Açıklama |
|---|---|---|---|
math/abs |
{value} |
result |
Mutlak değer |
math/sign |
{value} |
-1/0/1 |
Sayının işareti |
math/min |
{a, b} |
result |
Küçük olan |
math/max |
{a, b} |
result |
Büyük olan |
math/clamp |
{value, min, max} |
result |
Aralığa sıkıştır |
math/lerp |
{a, b, t} |
result |
Doğrusal interpolasyon (a+(b-a)*t/100) |
math/map |
{value, in_min, in_max, out_min, out_max} |
result |
Değeri farklı aralığa eşle |
math/sqrt |
{value} |
result |
floor(√value) — binary search, 16 iter |
math/pow |
{base, exp} |
result |
Üs alma |
math/log2 |
{value} |
result |
Taban-2 logaritma |
math/mod |
{a, b} |
result |
a mod b (her zaman ≥ 0) |
math/wrap |
{value, min, max} |
result |
Değeri aralıkta sar |
math/ceil_div |
{a, b} |
result |
⌈a/b⌉ tavan bölme |
math/distance2d |
{x1, z1, x2, z2} |
result |
XZ düzleminde mesafe |
math/distance3d |
{x1, y1, z1, x2, y2, z2} |
result |
3D mesafe |
math/random |
{min, max} |
result |
[min, max] LCG pseudo-random |
# Spawn noktasına mesafe
data modify storage macro:input x1 set value 0
data modify storage macro:input z1 set value 0
data modify storage macro:input x2 set value 30
data modify storage macro:input z2 set value 40
function macro:math/distance2d with storage macro:input {}
# output.result → 50
# Zar at (1-6)
data modify storage macro:input min set value 1
data modify storage macro:input max set value 6
function macro:math/random with storage macro:input {}
# output.result → 1..6
# HP yüzdesini 0-100 skalasına eşle
data modify storage macro:input value set value 14
data modify storage macro:input in_min set value 0
data modify storage macro:input in_max set value 20
data modify storage macro:input out_min set value 0
data modify storage macro:input out_max set value 100
function macro:math/map with storage macro:input {}
# output.result → 70| Fonksiyon | Input | Açıklama |
|---|---|---|
team/create |
{team} |
Takım oluştur |
team/delete |
{team} |
Takımı sil |
team/add |
{team, player} |
Oyuncuyu takıma ekle |
team/remove |
{player} |
Oyuncuyu takımdan çıkar |
team/has |
{team, player} |
result:1b/0b |
team/set_color |
{team, color} |
Takım rengini ayarla |
team/set_friendly_fire |
{team, value} |
"true" / "false"
|
team/count |
{team} |
result — Online üye sayısı |
team/list |
— | Takım listesini göster |
# PvP harita kurulumu
data modify storage macro:input team set value "red"
function macro:team/create with storage macro:input {}
data modify storage macro:input color set value "red"
function macro:team/set_color with storage macro:input {}
data modify storage macro:input value set value "false"
function macro:team/set_friendly_fire with storage macro:input {}
data modify storage macro:input team set value "red"
data modify storage macro:input player set value "Steve"
function macro:team/add with storage macro:input {}
# Takımda mı kontrol et
data modify storage macro:input team set value "red"
data modify storage macro:input player set value "Steve"
function macro:team/has with storage macro:input {}
execute if data storage macro:output {result:1b} run function mypack:red_team_logicSunucu geneli kalıcı yapılandırma.
| Fonksiyon | Input | Açıklama |
|---|---|---|
config/set |
{key, value} |
String değer yaz |
config/set_int |
{key, value} |
Tam sayı yaz |
config/set_default |
{key, value} |
Yoksa yaz (result:1b=yeni yazıldı) |
config/get |
{key} |
result — değer (yoksa null) |
config/has |
{key} |
result:1b/0b |
config/delete |
{key} |
Key'i sil |
config/list |
— | Tüm config'i göster |
config/reset |
— |
# load.mcfunction'da varsayılanları yükle
data modify storage macro:input key set value "max_party_size"
data modify storage macro:input value set value 4
function macro:config/set_int with storage macro:input {}
data modify storage macro:input key set value "server_name"
data modify storage macro:input value set value "My Server"
function macro:config/set_default with storage macro:input {}
# Çalışma zamanında oku
data modify storage macro:input key set value "max_party_size"
function macro:config/get with storage macro:input {}
# output.result → 4Global boolean flag sistemi. macro:engine flags altında saklanır.
| Fonksiyon | Input | Output | Açıklama |
|---|---|---|---|
flag/set |
{key} |
— | Flag'i 1b yap |
flag/unset |
{key} |
— | Flag'i kaldır |
flag/get |
{key} |
result:1b/0b |
Flag değerini oku |
flag/toggle |
{key} |
result:1b/0b |
Toggle et, yeni değeri döndür |
flag/list |
— | — | Tüm flag'leri göster |
flag/toggle_system |
{system} |
— |
#m_<system> macro.Flags toggle |
flag/list_systems |
— | — | Tick subsistem flag'lerini göster |
# Etkinliği başlat
data modify storage macro:input key set value "event_active"
function macro:flag/set with storage macro:input {}
# Etkinlik aktif mi?
data modify storage macro:input key set value "event_active"
function macro:flag/get with storage macro:input {}
execute if data storage macro:output {result:1b} run function mypack:event/tick_logic
# HUD sistemini kapat
data modify storage macro:input system set value "hud"
function macro:flag/toggle_system with storage macro:input {}Oyuncu başına durum makinesi. Oyuncunun tek bir aktif state'i olur.
| Fonksiyon | Input | Output | Açıklama |
|---|---|---|---|
state/set |
{player, state} |
— | State ata |
state/get |
{player} |
result |
Mevcut state'i oku |
state/is |
{player, state} |
result:1b/0b |
Belirli state'de mi? |
state/clear |
{player} |
— | State'i kaldır |
state/clear_all |
— | — | Tüm oyuncuların state'ini sil |
state/list |
— | — | Tüm state'leri göster |
# Oyuncuyu savaş moduna al
data modify storage macro:input player set value "Steve"
data modify storage macro:input state set value "combat"
function macro:state/set with storage macro:input {}
# Her tick: state'e göre farklı mantık çalıştır
data modify storage macro:input player set value "Steve"
data modify storage macro:input state set value "combat"
function macro:state/is with storage macro:input {}
execute if data storage macro:output {result:1b} run function mypack:states/combat_tick
data modify storage macro:input state set value "idle"
function macro:state/is with storage macro:input {}
execute if data storage macro:output {result:1b} run function mypack:states/idle_tickCoğrafi ve varlık konumu kontrolleri.
| Fonksiyon | Input | Açıklama |
|---|---|---|
geo/in_region |
{player, x, y, z, dx, dy, dz, invoke} |
Oyuncu AABB içindeyse komutu çalıştır |
geo/in_region_unless |
{player, x, y, z, dx, dy, dz, invoke} |
Oyuncu dışındaysa çalıştır |
geo/near_entity |
{player, type, distance, invoke} |
Yakın entity varsa çalıştır |
geo/near_entity_unless |
{player, type, distance, invoke} |
Yoksa çalıştır |
geo/as_nearby_player |
{x, y, z, distance, func} |
Yakındaki oyuncu olarak çalıştır |
⚠️ v1.0.6-pre2ileaction→invokeolarak değişti.
# Güvenli bölge kontrolü
data modify storage macro:input player set value "Steve"
data modify storage macro:input x set value -50
data modify storage macro:input y set value 60
data modify storage macro:input z set value -50
data modify storage macro:input dx set value 100
data modify storage macro:input dy set value 30
data modify storage macro:input dz set value 100
data modify storage macro:input invoke set value "function mypack:safe_zone/on_enter"
function macro:geo/in_region with storage macro:input {}
# 5 blok içinde zombie varsa uyar
data modify storage macro:input player set value "Steve"
data modify storage macro:input type set value "minecraft:zombie"
data modify storage macro:input distance set value 5
data modify storage macro:input invoke set value "function mypack:danger/zombie_nearby"
function macro:geo/near_entity with storage macro:input {}Envanter sorgulama ve öğe transferi.
| Fonksiyon | Input | Açıklama |
|---|---|---|
inv/player_if_item |
{player, item, invoke} |
Oyuncuda item varsa çalıştır |
inv/player_unless_item |
{player, item, invoke} |
Yoksa çalıştır |
inv/player_slot_if_item |
{player, slot, item, invoke} |
Belirli slotta item varsa |
inv/chest_minecart_if_item |
{tag, slot, customData, invoke} |
Sandık arabasında item varsa |
inv/chest_minecart_unless_item |
{tag, slot, customData, invoke} |
Yoksa |
inv/count_item |
{player, item} |
result — envanterdeki adet |
inv/clear_custom |
{player, customData} |
Custom item'ı sil |
inv/transfer_item |
{player, tag, slot, customData} |
Sandık arabasından oyuncuya transfer |
# Oyuncuda elmas varsa quest tamamla
data modify storage macro:input player set value "Steve"
data modify storage macro:input item set value "minecraft:diamond"
data modify storage macro:input invoke set value "function mypack:quest/complete"
function macro:inv/player_if_item with storage macro:input {}
# Envanterdeki elmas sayısını oku
data modify storage macro:input player set value "Steve"
data modify storage macro:input item set value "minecraft:diamond"
function macro:inv/count_item with storage macro:input {}
# output.result → elmas adedimacro_action trigger objective'i üzerinden /trigger komutunu fonksiyona bağlar. macro:input'e dokunmaz.
| Fonksiyon | Input | Açıklama |
|---|---|---|
trigger/bind |
{value, func} |
Değer→fonksiyon bağlantısı ekle |
trigger/bind_cmd |
{value, cmd} |
Değer→komut bağlantısı ekle |
trigger/unbind |
{value} |
Değerin tüm bağlantılarını kaldır |
trigger/unbind_all |
— | Tüm bağlantıları temizle |
trigger/enable |
{player} |
Oyuncuya trigger'ı aç |
trigger/disable |
{player} |
Oyuncunun trigger'ını kapat |
trigger/list |
— | Bağlantı listesini göster |
# load.mcfunction'da bağlantı kur
data modify storage macro:input value set value 1
data modify storage macro:input func set value "mypack:menu/open"
function macro:trigger/bind with storage macro:input {}
data modify storage macro:input value set value 2
data modify storage macro:input func set value "mypack:shop/open"
function macro:trigger/bind with storage macro:input {}
# Oyuncuya trigger'ı aç
data modify storage macro:input player set value "Steve"
function macro:trigger/enable with storage macro:input {}
# Oyuncu kullanımı (chat'te yazar):
# /trigger macro_action set 1 → mypack:menu/open çalışır
# /trigger macro_action set 2 → mypack:shop/open çalışırSeviyeli log sistemi. 1.21.6+'da dialog paneli açar, eski sürümlerde tellraw ile fallback yapar. Maks 30 giriş (circular buffer).
| Fonksiyon | Input | Açıklama |
|---|---|---|
log/info |
{message} |
INFO — yeşil |
log/warn |
{message} |
WARN — sarı |
log/error |
{message} |
ERROR — kırmızı |
log/debug |
{message} |
DEBUG — gri |
log/add |
{level, message, color} |
Ham giriş ekle |
log/show |
— |
@s'e log göster |
log/clear |
— | Tüm logları temizle |
data modify storage macro:input message set value "Etkinlik başladı"
function macro:log/info with storage macro:input {}
data modify storage macro:input message set value "Oyuncu limiti aşıldı!"
function macro:log/warn with storage macro:input {}
# Logları görüntüle (debug tag'i olan oyuncuya)
/function macro:log/showMinecraft komut sarmalayıcıları. Dinamik parametrelerle çalışır.
| Kategori | Fonksiyonlar |
|---|---|
| Oyuncu |
kill, damage, damage_typed, heal, kick, ban, pardon, op, deop
|
| Efekt |
effect_give, effect_give_all, effect_clear, effect_clear_one
|
| Mesaj |
msg, msg_raw, title, title_bold, title_sub, title_all, title_times, title_reset, title_clear, subtitle, actionbar
|
| Ses |
sound, sound_all, stopsound
|
| Item |
give, give_one, clear, clear_item, enchant, item_modify, item_rename
|
| Dünya |
setblock, fill, clone, clone_masked, summon, particle, weather, time_set, time_add
|
| Takım/Score |
scoreboard_set, scoreboard_get, scoreboard_add, tag_add, tag_remove
|
| Teleport |
tp, tp_facing, tp_to_entity, tp_to_player, spectate, spectate_stop
|
| XP |
xp_add, xp_set, xp_get
|
| Attribute |
attribute_get, attribute_set, attribute_add_modifier, attribute_remove_modifier, attribute_get_modifier
|
| Advancement |
advancement_grant, advancement_revoke, advancement_check
|
| Loot |
loot_give, loot_drop
|
| Bossbar |
bossbar_add, bossbar_remove, bossbar_set_value, bossbar_set_max, bossbar_set_players
|
| Diğer |
gamemode, gamerule, difficulty, display_name, locate_structure, place_feature, place_structure, spreadplayers, ride, ride_dismount, forceload_add, forceload_remove, trigger_set
|
| Multi-cmd |
cmd/other/multi_cmd/run, run_as, run_at, run_func, from_input, from_input_as
|
# Oyuncuya hasar ver
data modify storage macro:input player set value "Steve"
data modify storage macro:input amount set value 4
data modify storage macro:input type set value "macro:true_damage"
function macro:cmd/damage_typed with storage macro:input {}
# Bossbar oluştur ve değer ata
data modify storage macro:input id set value "mymap:boss"
data modify storage macro:input name set value "Son Boss"
data modify storage macro:input color set value "red"
function macro:cmd/bossbar_add with storage macro:input {}
data modify storage macro:input value set value 100
function macro:cmd/bossbar_set_max with storage macro:input {}
# Birden fazla komut sırayla çalıştır
data modify storage macro:engine _mcmd_list set value ["say Hazır!", "give @s minecraft:diamond 1", "effect give @s minecraft:speed 10 2 true"]
function macro:cmd/other/multi_cmd/run| Fonksiyon | Input | Açıklama |
|---|---|---|
string/chat |
{target, message, color} |
Oyuncuya renkli mesaj |
string/broadcast_raw |
{json} |
Tüm oyunculara ham JSON |
string/player_raw |
{player, json} |
Tek oyuncuya ham JSON |
string/announce |
{message} |
Tüm oyunculara duyuru |
string/announce_prefix |
{prefix, message, color} |
Prefix'li duyuru |
string/header |
{title, color} |
Dekoratif başlık (tüm oyuncular) |
string/progress_bar |
{player, current, max, label} |
Actionbar progress bar |
string/progress_bar_self |
— |
@s için auto-HUD |
string/hover_text |
{player, text, hover} |
Hover text içeren mesaj |
string/click_run |
{player, text, cmd} |
Tıklanabilir komut |
string/click_suggest |
{player, text, cmd} |
Tıklanabilir komut önerisi |
string/link |
{player, text, url} |
Tıklanabilir URL |
string/copy_to_clipboard |
{player, text, copy} |
Panoya kopyala |
string/tooltip_item |
{player, text, item} |
Item tooltip |
# Renkli duyuru
data modify storage macro:input message set value "Etkinlik başlıyor!"
data modify storage macro:input color set value "gold"
function macro:string/announce with storage macro:input {}
# Can çubuğu göster
data modify storage macro:input player set value "Steve"
data modify storage macro:input current set value 14
data modify storage macro:input max set value 20
data modify storage macro:input label set value "❤ Can"
function macro:string/progress_bar with storage macro:input {}
# Tıklanabilir link
data modify storage macro:input player set value "Steve"
data modify storage macro:input text set value "[Discord'a Katıl]"
data modify storage macro:input url set value "https://discord.gg/example"
function macro:string/link with storage macro:input {}| Fonksiyon | Input | Açıklama |
|---|---|---|
entity/for_each |
{type, tag, func} |
Eşleşen her entity için çalıştır |
entity/count |
{type, tag} |
result — entity sayısı |
entity/damage |
{tag, amount} |
Tag'li entity'lere hasar |
entity/give_effect |
{tag, effect, duration, amplifier} |
Efekt ver |
entity/kill_tagged |
{tag} |
Tag'li entity'leri öldür |
entity/summon_at_player |
{player, type, tag} |
Oyuncunun yanına entity çağır |
entity/tag_add |
{type, tag, new_tag} |
Tag ekle |
entity/tag_remove |
{type, tag, remove_tag} |
Tag kaldır |
entity/tp_to |
{tag, player} |
Entity'yi oyuncuya ışınla |
| Fonksiyon | Input | Açıklama |
|---|---|---|
world/setblock_if |
{x, y, z, block, invoke} |
Blok varsa komut çalıştır |
world/block_if |
{x, y, z, block, invoke} |
Blok koşulu sağlanırsa çalıştır |
world/block_unless |
{x, y, z, block, invoke} |
Blok yoksa çalıştır |
world/fill_replace |
{x1,y1,z1, x2,y2,z2, block, replace} |
Blok değiştir |
world/fill_hollow |
{x1,y1,z1, x2,y2,z2, block} |
İçi boş doldur |
world/fill_keep |
{x1,y1,z1, x2,y2,z2, block} |
Boş yerleri doldur |
world/fill_outline |
{x1,y1,z1, x2,y2,z2, block} |
Sadece çerçeve doldur |
world/clone_to |
{x1,y1,z1, x2,y2,z2, tx,ty,tz} |
Kopyala |
Sayısal karşılaştırma koşulları. Koşul sağlanırsa func çalıştırır.
| Fonksiyon | Input | Açıklama |
|---|---|---|
logic/if_eq |
{a, b, func} |
a == b |
logic/if_not_eq |
{a, b, func} |
a != b |
logic/if_gt |
{a, b, func} |
a > b |
logic/if_gte |
{a, b, func} |
a >= b |
logic/if_lt |
{a, b, func} |
a < b |
logic/if_lte |
{a, b, func} |
a <= b |
# Oyuncunun level'ı 10'dan büyük mü?
data modify storage macro:input player set value "Steve"
data modify storage macro:input key set value "level"
function macro:player/get_var with storage macro:input {}
# output.result → level değeri
# Şimdi logic karşılaştır (scoreboard üzerinden)
execute store result score $lvl macro.tmp run data get storage macro:output result
scoreboard players set $ten macro.tmp 10
# if_gt gibi direkt scoreboard kullanmak daha hızlı:
execute if score $lvl macro.tmp > $ten macro.tmp run function mypack:prestige/unlockexecute if predicate <id> komutuyla kullanılır.
| Predicate | Açıklama |
|---|---|
macro:is_survival |
Survival modu |
macro:is_creative |
Creative modu |
macro:is_sneaking |
Sinsi hareket |
macro:is_sprinting |
Koşuyor |
macro:is_flying |
Uçuyor |
macro:is_gliding |
Elytra süzülmesi |
macro:is_burning |
Yanıyor |
macro:is_on_ground |
Yerde |
macro:is_in_water |
Suda |
macro:is_hungry |
Açlık bar'ı dolu değil |
macro:is_full_health |
Tam can (20 HP) |
macro:health_below_half |
Can yarının altında |
macro:has_empty_mainhand |
Ana el boş |
macro:has_empty_offhand |
Arka el boş |
macro:is_holding_sword |
Kılıç tutuyor |
macro:is_holding_bow |
Yay tutuyor |
macro:is_holding_trident |
Üçlü tutuyor |
macro:is_baby |
Yavru mob |
macro:is_daytime |
Gündüz (0–12000 tick) |
macro:is_raining |
Yağmur yağıyor |
macro:is_thundering |
Gök gürültülü fırtına |
macro:weather_clear |
Açık hava |
macro:in_overworld |
Üst dünya |
macro:in_nether |
Nether |
macro:in_end |
The End |
# Nether'da sinsi survival oyuncusuna etki
execute as @a if predicate macro:in_nether if predicate macro:is_sneaking if predicate macro:is_survival run function mypack:nether_sneak_bonus
# Canı yarının altındaki oyunculara uyarı
execute as @a if predicate macro:health_below_half run function mypack:low_health_warning| ID | Açıklama |
|---|---|
macro:repair_full |
Tam onar |
macro:damage_random |
Rastgele hasar ver |
macro:enchant_randomly |
Rastgele büyüle |
macro:enchant_with_levels_5 |
5 seviyeyle büyüle |
macro:enchant_with_levels_30 |
30 seviyeyle büyüle |
macro:set_count_1 |
Miktarı 1 yap |
macro:set_count_64 |
Miktarı 64 yap |
macro:lore_add_custom |
Lore ekle |
macro:lore_clear |
Lore'u temizle |
macro:glint_add |
Parlaklık efekti ekle |
macro:glint_remove |
Parlaklık efektini kaldır |
macro:unbreakable |
Kırılmaz yap |
macro:hide_tooltip |
Tooltip'i gizle |
macro:rename_to_custom |
Yeniden adlandır |
item modify entity @s weapon.mainhand macro:enchant_with_levels_30
item modify entity @s weapon.mainhand macro:glint_add| ID | Açıklama |
|---|---|
macro:magic |
Magic hasar (zırh yok sayılmaz) |
macro:true_damage |
Gerçek hasar (zırh ve enchant yok sayılır) |
macro:void_custom |
Void hasarı |
macro:fire_custom |
Ateş hasarı |
macro:wither_custom |
Wither hasarı |
| ID | Kullanım |
|---|---|
macro:util/empty |
Hiçbir şey düşürme |
macro:util/xp_only |
Sadece XP düşür |
macro:util/self_drop |
Kendini düşür |
macro:template/single_item |
Tek item şablonu |
macro:template/weighted_pool |
Ağırlıklı havuz |
macro:template/conditional_drop |
Koşullu düşürme |
macro:template/bonus_per_looting |
Looting başına bonus |
macro:engine pb_obj ayarlandığında tick her 4 tick'te progress bar'ı otomatik günceller:
# Oyuncu can çubuğunu HUD'a bağla
data modify storage macro:engine pb_obj set value "health"
data modify storage macro:engine pb_max set value 20
data modify storage macro:engine pb_label set value "❤ Can"
# Kapat
data remove storage macro:engine pb_obj# load.mcfunction'da tüm handler'ları kaydet
data modify storage macro:input event set value "on_player_join"
data modify storage macro:input func set value "mypack:systems/welcome"
function macro:event/register with storage macro:input {}
data modify storage macro:input func set value "mypack:systems/daily_reward"
function macro:event/register with storage macro:input {}
data modify storage macro:input func set value "mypack:systems/load_data"
function macro:event/register with storage macro:input {}
# Oyuncu katılımda (advancement veya tick tespiti):
data modify storage macro:engine event_context.player set value "Steve"
data modify storage macro:input event set value "on_player_join"
function macro:event/fire with storage macro:input {}
# → welcome + daily_reward + load_data sırayla çalışır# Her 5 dakikada otomatik kaydet
data modify storage macro:input func set value "mypack:systems/autosave"
data modify storage macro:input interval set value 6000
data modify storage macro:input key set value "autosave"
function macro:lib/schedule with storage macro:input {}
# Her saniye border kontrolü (throttle ile optimize et)
data modify storage macro:input func set value "mypack:systems/border_check"
data modify storage macro:input delay set value 0
data modify storage macro:input interval set value 20
data modify storage macro:input key set value "border_check"
function macro:lib/throttle with storage macro:input {}# NPC patrol state machine (her tick çalışır)
data modify storage macro:input player set value "guard_npc"
data modify storage macro:input state set value "patrol"
function macro:state/is with storage macro:input {}
execute if data storage macro:output {result:1b} run function mypack:npc/patrol_tick
data modify storage macro:input state set value "chase"
function macro:state/is with storage macro:input {}
execute if data storage macro:output {result:1b} run function mypack:npc/chase_tick
data modify storage macro:input state set value "return"
function macro:state/is with storage macro:input {}
execute if data storage macro:output {result:1b} run function mypack:npc/return_tick# mypack:skill/fireball.mcfunction
# Cooldown kontrolü
data modify storage macro:input player set value "Steve"
data modify storage macro:input key set value "fireball"
function macro:cooldown/check with storage macro:input {}
execute if data storage macro:output {result:0b} run function mypack:skill/fireball_busy
execute if data storage macro:output {result:1b} run function mypack:skill/fireball_cast
# mypack:skill/fireball_cast.mcfunction
execute as @a[name=Steve,limit=1] at @s run summon minecraft:fireball ^ ^ ^3 {power:[0.0,0.0,0.0]}
data modify storage macro:input player set value "Steve"
data modify storage macro:input key set value "fireball"
data modify storage macro:input duration set value 100
function macro:cooldown/set with storage macro:input {}
data modify storage macro:input player set value "Steve"
data modify storage macro:input current set value 0
data modify storage macro:input max set value 100
data modify storage macro:input label set value "🔥 Fireball"
function macro:string/progress_bar with storage macro:input {}
# mypack:skill/fireball_busy.mcfunction
data modify storage macro:input player set value "Steve"
data modify storage macro:input key set value "fireball"
function macro:cooldown/remaining with storage macro:input {}
# output.result = kalan tick — actionbar'da gösterilebilir# mypack:event/pvp_start.mcfunction
# Takımları kur
data modify storage macro:input team set value "red"
function macro:team/create with storage macro:input {}
data modify storage macro:input color set value "red"
function macro:team/set_color with storage macro:input {}
data modify storage macro:input value set value "false"
function macro:team/set_friendly_fire with storage macro:input {}
data modify storage macro:input team set value "blue"
function macro:team/create with storage macro:input {}
data modify storage macro:input color set value "blue"
function macro:team/set_color with storage macro:input {}
data modify storage macro:input value set value "false"
function macro:team/set_friendly_fire with storage macro:input {}
# Flag'i aktifleştir
data modify storage macro:input key set value "pvp_active"
function macro:flag/set with storage macro:input {}
# Duyuru
data modify storage macro:input message set value "⚔ PvP Etkinliği Başladı!"
data modify storage macro:input color set value "red"
function macro:string/announce with storage macro:input {}
# 10 dakika sonra bitir
data modify storage macro:input func set value "mypack:event/pvp_end"
data modify storage macro:input delay set value 12000
function macro:lib/wait with storage macro:input {}
# mypack:event/pvp_end.mcfunction
data modify storage macro:input key set value "pvp_active"
function macro:flag/unset with storage macro:input {}
data modify storage macro:input func set value "mypack:event/give_reward"
function macro:lib/for_each_player with storage macro:input {}
data modify storage macro:input message set value "🏆 Etkinlik Bitti! Ödüller verildi."
function macro:string/announce with storage macro:input {}
data modify storage macro:input team set value "red"
function macro:team/delete with storage macro:input {}
data modify storage macro:input team set value "blue"
function macro:team/delete with storage macro:input {}# mypack:rpg/give_xp.mcfunction (input: player, amount)
# XP ekle
data modify storage macro:input key set value "xp"
function macro:player/add_to_var with storage macro:input {}
# XP 1000'e ulaştı mı? (scoreboard üzerinden kontrol)
data modify storage macro:input key set value "xp"
function macro:player/get_var with storage macro:input {}
execute store result score $xp macro.tmp run data get storage macro:output result
execute if score $xp macro.tmp matches 1000.. run function mypack:rpg/level_up
# mypack:rpg/level_up.mcfunction
data modify storage macro:input key set value "xp"
data modify storage macro:input value set value 0
function macro:player/set_var with storage macro:input {}
data modify storage macro:input key set value "level"
function macro:player/increment with storage macro:input {}
data modify storage macro:engine event_context.player set from storage macro:input player
data modify storage macro:input event set value "on_level_up"
function macro:event/fire with storage macro:input {}
⚠️ Breaking Changes — Güncelleme Öncesi Mutlaka Oku
Aşağıdaki modüllerde macro:input action → macro:input invoke olarak değişti:
-
geo/in_region,geo/in_region_unless -
geo/near_entity,geo/near_entity_unless -
inv/player_if_item,inv/player_unless_item,inv/player_slot_if_item -
inv/chest_minecart_if_item,inv/chest_minecart_unless_item -
world/block_if,world/block_unless
# ESKİ (v1.0.5):
data modify storage macro:input action set value "say Bölgede"
# YENİ (v1.0.6-pre2+):
data modify storage macro:input invoke set value "say Bölgede"Aynı alanlar callback ismini kullanıyordu (1.21.4 reserved keyword çakışması). v1.0.6-pre2'de callback → invoke olarak tekrar değişti.
| Sürüm | Tarih | Öne Çıkanlar |
|---|---|---|
| v1.0.6-pre4 | 2026-03-06 | Multi-command sistemi, flag/open_toggle_system_menu
|
| v1.0.6-pre3 | 2026-03-06 | Flag-kontrollü tick sistemi, toggle_system, 3 kritik bug fix |
| v1.0.6-pre2 | 2026-03-05 |
#ame.* isimlendirme, action → invoke
|
| v1.0.5 | 2026-03-05 |
action → callback, dialog/close fix, overlay temizliği |
| v1.0.3-pre | — | Log sistemi, tick_guard, trigger sistemi |
| v3.4 | — | Flag, state, schedule, dialog, yeni cmd/string |
| v3.3 | — | damage_type, item_modifier, loot_table, advancement, 11 yeni predicate |
| v3.2 | — |
math/random LCG fix, event/fire_queued, flag & state modülleri |
| v3.0 | — | team/, config/, input_push/pop, 3 kritik bug fix |
| v2.4 | — |
$epoch tabanlı cooldown, progress_bar görsel fix |
| v2.3 | — | Cooldown, event/hook sistemi, yeni math |
# Tüm sistemi kontrol et
/function macro:debug
# Tek oyuncu verisi
data modify storage macro:input player set value "Steve"
function macro:player/list_vars with storage macro:input {}
# Aktif event'leri listele
/function macro:event/list
# Aktif zamanlayıcıları listele
/function macro:lib/schedule_list
# Logları görüntüle (debug tag gerekli)
/function macro:log/show
# Sistem flag'lerini kontrol et
/function macro:flag/list_systems
# Trigger bağlantılarını listele
/function macro:trigger/list| Hata | Sebep | Çözüm |
|---|---|---|
Unknown function macro:... |
Datapak yüklenmemiş |
/reload çalıştır, macro.debug tag'i ekle |
| Cooldown hiç dolmuyor | Eski sürüm $tick kullanılıyor |
v2.4+ $epoch sistemi gerekli |
| Dialog açılmıyor / loading takılı |
macro.dialog_opened tag'i kalmış |
tag @s remove macro.dialog_opened |
Komut için geçersiz değişken |
$ ile başlayan fake player adı 1.21.1'de macro olarak ayrıştırılıyor |
v1.0.6-pre2'ye güncelle (#ame.* formatı) |
action alanı tanınmıyor |
1.21.4+ reserved keyword |
invoke kullan (v1.0.6-pre2+) |
geo/in_region çalışmıyor |
action → invoke değişikliği |
Input alanını invoke olarak güncelle |
| Scoreboard değeri sürekli 1 dönüyor |
$ ile başlayan fake player adı macro olarak ayrıştırılıyor |
v1.0.6-pre3'e güncelle |
process_queue stack overflow |
Çok derin özyineleme | v3.0+ $pq_depth limit (256/tick) otomatik korur |
/reload sonrası cooldown geçersiz |
Eski $tick bazlı sistem |
v2.4+ epoch tabanlı sistem; /reload'da sıfırlanmaz |
| Tick'te iki kez çalışan sistem |
tick_guard eksik |
function macro:lib/tick_guard → return 0 ise dur |
AME, yükleme sırasında versiyon skorlarını (#ame.major, #ame.minor, #ame.patch) yazar. Sonraki /reload'da bu skorlar kontrol edilir; uyuşmazsa yükleme iptal edilir ve load/warn dialog'u açılır.
# Manuel versiyon skorlarını kontrol et
/scoreboard players get #ame.major ame.pre_version
/scoreboard players get #ame.minor ame.pre_version
/scoreboard players get #ame.patch ame.pre_version| MC Sürümü | Dikkat Edilmesi Gerekenler |
|---|---|
| 1.21.1–1.21.3 |
clickEvent/hoverEvent eski sözdizimi aktif |
| 1.21.4 |
action reserved keyword — callback/invoke kullan |
| 1.21.5+ |
click_event/hover_event yeni sözdizimi |
| 1.21.6+ |
macro:dialog/ API tam destek; log/show dialog açar |