File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
src/main/java/org/spongepowered/api Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 284284import org .spongepowered .api .world .weather .Weather ;
285285import org .spongepowered .api .world .weather .WeatherType ;
286286import org .spongepowered .api .world .weather .WeatherTypes ;
287+ import org .spongepowered .math .matrix .Matrix4d ;
287288import org .spongepowered .math .vector .Vector2i ;
288289import org .spongepowered .math .vector .Vector3d ;
289290import org .spongepowered .math .vector .Vector3i ;
@@ -2287,6 +2288,11 @@ public final class Keys {
22872288 */
22882289 public static final Key <Value <ResourceKey >> MAP_WORLD = Keys .key (ResourceKey .sponge ("map_world" ), ResourceKey .class );
22892290
2291+ /**
2292+ * The {@link Matrix4d} of a {@link DisplayEntity}
2293+ */
2294+ public static final Key <Value <Matrix4d >> MATRIX = Keys .key (ResourceKey .sponge ("matrix" ), Matrix4d .class );
2295+
22902296 /**
22912297 * The matter state of a {@link BlockState}
22922298 * Readonly
Original file line number Diff line number Diff line change 2828import org .spongepowered .api .entity .Entity ;
2929import org .spongepowered .api .util .Ticks ;
3030import org .spongepowered .api .util .Transform ;
31+ import org .spongepowered .math .matrix .Matrix4d ;
3132
3233import java .util .Optional ;
3334
@@ -125,6 +126,15 @@ default Double viewRange() {
125126 return this .require (Keys .VIEW_RANGE );
126127 }
127128
129+ /**
130+ * Returns the matrix.
131+ *
132+ * @return the matrix.
133+ */
134+ default Matrix4d matrix () {
135+ return this .require (Keys .MATRIX );
136+ }
137+
128138 // TODO bounding box (maybe BASE_SIZE if this is not smth. else in the entity)
129139 // TODO glow_color_override -1 = use team color
130140
You can’t perform that action at this time.
0 commit comments