Skip to content

Instantly share code, notes, and snippets.

@Cervator
Created July 21, 2016 21:58
Show Gist options
  • Save Cervator/58a2fc8e0ff6efb28a3c472334c98b61 to your computer and use it in GitHub Desktop.
Save Cervator/58a2fc8e0ff6efb28a3c472334c98b61 to your computer and use it in GitHub Desktop.
...
{
"name": "Sample:SomeBlock",
"persisted": true,
"alwaysRelevant": false,
"Sample:ThrowingBlock": {
"x": 0.0,
"y": 20.0,
"z": 0.0
}
},
...
{
"basedOn": "core:rock",
"displayName": "Hello Block",
"penetrable": true,
"entity": {
"prefab": "Sample:SomeBlock"
}
}
{
"ThrowingBlock": {
"x": 0.0,
"y": 20.0,
"z": 0.0
}
}
package org.terasology;
import org.terasology.entitySystem.Component;
//import org.terasology.math.geom.Vector3f;
public class ThrowingBlockComponent implements Component {
// public Vector3f velocity;
public float x;
public float y;
public float z;
}
@Cervator
Copy link
Author

Cervator commented Jul 21, 2016

Working Vector3f version:

{
  "ThrowingBlock": {
    "velocity": [0.0, 20.0, 0.0]
  }
}

entity dump:

    {
      "name": "Sample:SomeBlock",
      "persisted": true,
      "alwaysRelevant": false,
      "Sample:ThrowingBlock": {
        "velocity": [
          0.0,
          20.0,
          0.0
        ]
      }
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment