ZenScript main repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

integration.zs 890B

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