mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 23:27:09 +00:00
Loot Table Modifier generator (#758)
* Loot Table Modifier loot_modifier generator
Should support everything currently implemented
* Translation keys
* Make 'actions' and 'predicates' always a list
Seems simpler to understand and a list of one entry behaves exactly the same
* Update loot-table-modifier.mcdoc
Should match currently latest commit
* Fix loot modifier path in datapack being incorrect
* Match v2 alpha 1
* Import LootPoolEntry
* Add files via upload
* Revert "Add files via upload"
This reverts commit 7e9c50ee10.
* add condition_add action
* Add union member name overrides
Co-authored-by: Misode <misoloo64@gmail.com>
---------
Co-authored-by: Misode <misoloo64@gmail.com>
This commit is contained in:
@@ -432,6 +432,10 @@ function UnionHead({ type, optional, node, ctx }: Props<UnionType<SimplifiedMcdo
|
||||
}
|
||||
|
||||
function formatUnionMember(type: SimplifiedMcdocTypeNoUnion, others: SimplifiedMcdocTypeNoUnion[]): string {
|
||||
const memberNameAttribute = type.attributes?.find(a => a.name === 'misode_member_name')?.value
|
||||
if (memberNameAttribute?.kind === 'literal' && memberNameAttribute.value.kind === 'string') {
|
||||
return memberNameAttribute.value.value
|
||||
}
|
||||
if (type.kind === 'literal') {
|
||||
return formatIdentifier(type.value.value.toString())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user