User Tools

Site Tools


wiki:syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:syntax [2023/04/19 20:16] – external edit 127.0.0.1wiki:syntax [2023/09/13 18:47] (current) – ↷ Links adapted because of a move operation nebelnidas
Line 1: Line 1:
 ====== Formatting Syntax ====== ====== Formatting Syntax ======
  
-[[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing "Edit this page". If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too.+[[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing "Edit this page". If you want to try something, just use the [[drafts:new_mixin_example|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too.
  
 ===== Basic Text Formatting ===== ===== Basic Text Formatting =====
Line 375: Line 375:
   </nowiki>   </nowiki>
   The same is true for %%//__this__ text// with a smiley ;-)%%.   The same is true for %%//__this__ text// with a smiley ;-)%%.
 +  
 +===== map2fabricyarn Syntax =====  
 +To avoid code becoming outdated due to mappings changes, it is possible to write code blocks in Intermediary. This wiki's map2fabricyarn plugin adds ''%%<yarncode>%%'' & ''%%<yarnfile>%%''. All intermediary names inside code blocks created using ''%%<yarncode>%%'' & ''%%<yarnfile>%%'' are remapped to Yarn. Otherwise their syntax and behaviour is identical to DokuWiki's ''%%<code>%%'' & ''%%<file>%%''.  
 +  
 +<code>
 +<yarncode java>  
 +public static class_2248 TEST;  
 +  
 +@Override  
 +public void onInitialize() {  
 +    TEST = class_2378.method_10230(class_2378.field_11146, new class_2960(MOD_ID, "test"), new class_2248(FabricBlockSettings.method_9630(class_2246.field_10340)));  
 +}  
 +</yarncode> 
 +</code>  
 +  
 +  
 +<yarncode java>  
 +public static class_2248 TEST;  
 +  
 +@Override  
 +public void onInitialize() {  
 +    TEST = class_2378.method_10230(class_7923.field_41175, new class_2960(MOD_ID, "test"), new class_2248(FabricBlockSettings.method_9630(class_2246.field_10340)));  
 +}  
 +</yarncode>  
 +The easiest way to create Intermediary code for ''%%<yarncode>%%'' blocks is to build your example mod, then unzip the sources-dev JAR.  
 +  
 +To remap without creating a code block, use the ''%%<yarn>%%'' tag. The content to remap should be inside the ''%%<>%%'', separated from ''%%<yarn%%'' by a single space.  
 +Example: %%<yarn class_2960>%% becomes <yarn class_2960>.\\  
 +This tag can have formatting applied by the standard tags.  
 +  
 +To output a fully qualified Yarn class name, input a fully qualified Intermediary name by prefixing it with ''net.minecraft.''.
  
 ===== Code Blocks ===== ===== Code Blocks =====
wiki/syntax.1681935379.txt.gz · Last modified: 2023/04/19 20:16 by 127.0.0.1