ZenScript main repository
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

integration.zs 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import example.TestClass;
  2. import example.TestInterface;
  3. val instance = new TestClass("Instance");
  4. println("Name: " + instance.name);
  5. instance.dump();
  6. var generated = instance.generate();
  7. println(generated.getValue());
  8. class TestOperators {
  9. public (name as string) as void {
  10. println("MyTestClass: " + name);
  11. }
  12. //.(key as string) as string
  13. // => "key " + key;
  14. }
  15. /*class TestImplementation {
  16. public implements TestInterface {
  17. interfaceMethod() => "TestImplementation";
  18. }
  19. }*/
  20. val testInstance = new TestOperators();
  21. //testInstance("something");
  22. something.dump();
  23. val objects = makeArray(5);
  24. printMany(objects);
  25. println(<test string>);
  26. println(<test string>.name);
  27. println(<test string>.interfaceMethod());
  28. //println(new TestImplementation().interfaceMethod());
  29. var diamond = <item:minecraft:diamond>;
  30. var dirt = <item:minecraft:dirt>;
  31. addShapedRecipe("TestRecipe", diamond, [[dirt, dirt, dirt],[dirt, dirt, dirt],[dirt, dirt, dirt]]);
  32. var count = 10;
  33. floatMethod(5f * count);
  34. invokeFunctional(name => "Hello " + name);