{ "_fv": 6, "_type": "procedure", "definition": { "procedurexml": "detect_coffretest_xtext_zxxyyzzNumCoffreNo additional triggerOROREQMODROUNDDOWN160EQMODROUNDDOWN160OREQMODROUNDDOWNADD1160EQMODROUNDDOWNADD1160local:NumCoffre0local:test_xMULTIPLYROUNDDOWNDIVIDE1616local:text_zMULTIPLYROUNDDOWNDIVIDE1616X: local:test_x Z: local:text_zTRUElocal:zzSets number variable for the X coordinates.local:text_zlocal:detect_coffresets a variable to false before the system starts the test.FALSE16local:yySets number variable for the Y coordinates.2254local:xxSets number variable for the Z coordinates.local:test_x16Checks for a block at the current variable location.local:xxlocal:yylocal:zzBlocks.CHESTlocal:detect_coffreIf the block is found, the variable that was set to false will be set to true.TRUElocal:NumCoffreADDlocal:NumCoffre1local:xxIf no block is found, it will increase the variable Z coordinate by 1.ADDlocal:xx1local:yyIf no block is found, it will increase the variable Y coordinate by 1.ADDlocal:yy1local:zzIf no block is found, it will increase the variable X coordinate by 1.ADDlocal:zz1In the \"do\" section, you can add whatever you want it to do if it finds the block.EQTests if the variable is true.local:detect_coffreTRUECoffre : local:NumCoffreFALSEPas CoffreFALSEThis example will test if the entity is holding a specific item. If it is true, then it will give the entity a level 2 status effect of speed for 3 seconds.Blocks.SAPLING#0Blocks.DIAMOND_BLOCKMULTIPLYROUNDDOWNDIVIDEROUND1616ADD2MULTIPLYROUNDDOWNDIVIDEROUND1616" } }