Skip to content

Commit 439db51

Browse files
committed
Update camera presets to 1.21.90
1 parent 5dec722 commit 439db51

4 files changed

Lines changed: 351 additions & 0 deletions

File tree

packages/minecraftBedrock/language/mcfunction/main.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10630,6 +10630,10 @@
1063010630
},
1063110631
{
1063210632
"requires": {
10633+
"targetVersion": [
10634+
"<",
10635+
"1.21.90"
10636+
],
1063310637
"experimentalGameplay": [
1063410638
"experimentalCreatorCameraFeatures"
1063510639
]
@@ -10685,6 +10689,90 @@
1068510689
]
1068610690
}
1068710691
]
10692+
},
10693+
{
10694+
"requires": {
10695+
"targetVersion": [
10696+
">=",
10697+
"1.21.90"
10698+
]
10699+
},
10700+
"commands": [
10701+
{
10702+
"commandName": "controlscheme",
10703+
"description": "Sets or clears control scheme",
10704+
"arguments": [
10705+
{
10706+
"type": "selector",
10707+
"argumentName": "players"
10708+
},
10709+
{
10710+
"type": "string",
10711+
"additionalData": {
10712+
"values": [
10713+
"set"
10714+
]
10715+
}
10716+
},
10717+
{
10718+
"type": "string",
10719+
"argumentName": "controlscheme",
10720+
"additionalData": {
10721+
"values": [
10722+
"camera_relative",
10723+
"locked_player_relative_strafe",
10724+
"player_relative",
10725+
"player_relative_strafe"
10726+
]
10727+
}
10728+
}
10729+
]
10730+
}
10731+
]
10732+
},
10733+
{
10734+
"requires": {
10735+
"targetVersion": [
10736+
">=",
10737+
"1.21.90"
10738+
],
10739+
"experimentalGameplay": [
10740+
"experimentalCreatorCameraFeatures"
10741+
]
10742+
},
10743+
"commands": [
10744+
{
10745+
"commandName": "controlscheme",
10746+
"description": "Sets or clears control scheme",
10747+
"arguments": [
10748+
{
10749+
"type": "selector",
10750+
"argumentName": "players"
10751+
},
10752+
{
10753+
"type": "string",
10754+
"additionalData": {
10755+
"values": [
10756+
"set"
10757+
]
10758+
}
10759+
},
10760+
{
10761+
"type": "string",
10762+
"argumentName": "controlscheme",
10763+
"additionalData": {
10764+
"values": [
10765+
"camera_relative",
10766+
"camera_relative_strafe",
10767+
"locked_player_relative_strafe",
10768+
"player_relative",
10769+
"player_relative_strafe"
10770+
]
10771+
}
10772+
}
10773+
]
10774+
}
10775+
]
1068810776
}
1068910777
]
1069010778
}

packages/minecraftBedrock/schema/cameraPreset/main.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,20 @@
156156
"then": {
157157
"$ref": "./v1.21.80/main.json"
158158
}
159+
},
160+
{
161+
"if": {
162+
"properties": {
163+
"format_version": {
164+
"enum": [
165+
"1.21.90"
166+
]
167+
}
168+
}
169+
},
170+
"then": {
171+
"$ref": "./v1.21.90/main.json"
172+
}
159173
}
160174
]
161175
}

packages/minecraftBedrock/schema/cameraPreset/v1.21.80/main.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@
208208
}
209209
}
210210
},
211+
// TODO: remove once 1.21.90 goes stable
211212
{
212213
"$ref": "../../project/experimentalGameplay/experimentalCreatorCameraFeatures.json",
213214
"then": {
Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema",
3+
"type": "object",
4+
"properties": {
5+
"minecraft:camera_preset": {
6+
"title": "Camera Preset Definition",
7+
"required": [
8+
"identifier"
9+
],
10+
"type": "object",
11+
"allOf": [
12+
{
13+
"properties": {
14+
"identifier": {
15+
"title": "Identifier",
16+
"$ref": "../../general/reference/prefixedFileIdentifier.json",
17+
"description": "The identifier for this camera preset. The name must include a namespace and must not use the Minecraft namespace."
18+
},
19+
"inherit_from": {
20+
"title": "Camera Inheritor",
21+
"description": "Inherits the properties of the specified camera preset.",
22+
"$ref": "../../general/reference/identifiers.json#/definitions/camera_preset_identifiers"
23+
}
24+
}
25+
},
26+
{
27+
"properties": {
28+
"aim_assist": {
29+
"title": "Aim Assist",
30+
"type": "object",
31+
"properties": {
32+
"preset": {
33+
"title": "Preset",
34+
"description": "The preset ID to enable aim assist with.",
35+
"$ref": "../../general/reference/identifiers.json#/definitions/aim_assist_preset_identifiers"
36+
},
37+
"distance": {
38+
"title": "Distance",
39+
"type": "number"
40+
},
41+
"target_mode": {
42+
"title": "Target Mode",
43+
"type": "string",
44+
"enum": [
45+
"angle",
46+
"distance"
47+
]
48+
},
49+
"angle": {
50+
"title": "Angle",
51+
"oneOf": [
52+
{
53+
"type": "array",
54+
"items": {
55+
"type": "number"
56+
},
57+
"minItems": 2,
58+
"maxItems": 2
59+
},
60+
{
61+
"type": "object",
62+
"properties": {
63+
"x": {
64+
"type": "number"
65+
},
66+
"y": {
67+
"type": "number"
68+
}
69+
}
70+
}
71+
]
72+
}
73+
},
74+
"additionalProperties": false
75+
},
76+
"align_target_and_camera_forward": {
77+
"title": "Align Target and Camera Forward",
78+
"description": "Whether the camera will be locked to have the same forward as its target.",
79+
"type": "boolean",
80+
"default": true
81+
},
82+
"continue_targeting": {
83+
"title": "Continue Targeting",
84+
"description": "Set this flag if you want the camera to continue tracking the entity even when the target moves outside the valid rotation limits.",
85+
"type": "boolean"
86+
},
87+
"entity_offset": {
88+
"title": "Entity Offset",
89+
"description": "Changes the point of the entity the camera pivots around (x, y, z). x, y and z can be floats between -64 and 64.",
90+
"type": "array",
91+
"items": {
92+
"type": "number",
93+
"minimum": -64,
94+
"maximum": 64
95+
},
96+
"minItems": 3,
97+
"maxItems": 3
98+
},
99+
"horizontal_rotation_limit": {
100+
"title": "Horizontal Rotation Limit",
101+
"description": "Set the horizontal rotation limit for the target camera (x, y), where x represents rotation to the left, and y to the right. Values can be from 0 to 360.0.",
102+
"type": "array",
103+
"items": {
104+
"type": "number",
105+
"minimum": 0.0,
106+
"maximum": 360.0
107+
},
108+
"minItems": 2,
109+
"maxItems": 2
110+
},
111+
"listener": {
112+
"title": "Listener",
113+
"description": "Specify 'camera' or 'player' to control whether the camera or player is used for audio listening position when this preset is active.",
114+
"type": "string",
115+
"enum": [
116+
"camera",
117+
"player"
118+
]
119+
},
120+
"player_effects": {
121+
"title": "Player Effects",
122+
"description": "Specify whether to allow effects on the player to affect how the game renders when this preset is active.",
123+
"type": "boolean"
124+
},
125+
"pos_x": {
126+
"title": "X Position",
127+
"description": "Set an X position for this camera's behavior.",
128+
"type": "integer"
129+
},
130+
"pos_y": {
131+
"title": "Y Position",
132+
"description": "Set a Y position for this camera's behavior.",
133+
"type": "integer"
134+
},
135+
"pos_z": {
136+
"title": "Z Position",
137+
"description": "Set a Z position for this camera's behavior.",
138+
"type": "integer"
139+
},
140+
"radius": {
141+
"title": "Radius",
142+
"description": "Set a radius for this camera's behavior.",
143+
"type": "number",
144+
"minimum": 0
145+
},
146+
"rotation_speed": {
147+
"title": "Rotation Speed",
148+
"description": "Set the rotation speed for the camera.",
149+
"type": "number"
150+
},
151+
"rot_x": {
152+
"title": "X Rotation",
153+
"description": "Set an X rotation for this camera's behavior.",
154+
"type": "integer",
155+
"minimum": -90,
156+
"maximum": 90
157+
},
158+
"rot_y": {
159+
"title": "Y Rotation",
160+
"description": "Set a Y rotation for this camera's behavior.",
161+
"minimum": -360,
162+
"maximum": 360
163+
},
164+
"snap_to_target": {
165+
"title": "Snap to Target",
166+
"description": "Set this flag if you want the camera to snap to your target immediately in the first frame. Only available with a valid rotation speed.",
167+
"type": "boolean"
168+
},
169+
"tracking_radius": {
170+
"title": "Tracking Radius",
171+
"description": "Set a value for the block radius around the camera to keep tracking the target entity. Defaults to 50 blocks.",
172+
"type": "number"
173+
},
174+
"vertical_rotation_limit": {
175+
"title": "Vertical Rotation Limit",
176+
"description": "Set the vertical rotation limit for the target camera (x, y). Values can be from 0.0 to 180.0 inclusive in world space where 0 degrees is straight down, 90 degrees is horizontal and 180 degrees is straight up.",
177+
"items": {
178+
"type": "number",
179+
"minimum": 0,
180+
"maximum": 360
181+
},
182+
"minItems": 2,
183+
"maxItems": 2
184+
},
185+
"view_offset": {
186+
"title": "View Offset",
187+
"description": "Creates an over the shoulder type offset (x, y). x and y can be floats between -64 and 64.",
188+
"type": "array",
189+
"items": {
190+
"type": "number"
191+
},
192+
"minItems": 2,
193+
"maxItems": 2
194+
},
195+
"yaw_limits_max": {
196+
"title": "Yaw Limits Maximum",
197+
"description": "Set a max limit for the yaw of third person cameras.",
198+
"type": "number",
199+
"minimum": -180,
200+
"maximum": 180
201+
},
202+
"yaw_limits_min": {
203+
"title": "Yaw Limits Minimum",
204+
"description": "Set a min limit for the yaw of third person cameras.",
205+
"type": "number",
206+
"minimum": -180,
207+
"maximum": 180
208+
}
209+
}
210+
},
211+
{
212+
"$ref": "../../project/experimentalGameplay/experimentalCreatorCameraFeatures.json",
213+
"then": {
214+
"properties": {
215+
"control_scheme": {
216+
"title": "Control Scheme",
217+
"description": "Set a default scheme for this camera.",
218+
"type": "string",
219+
"enum": [
220+
"locked_player_relative_strafe",
221+
"camera_relative",
222+
"camera_relative_strafe",
223+
"player_relative",
224+
"player_relative_strafe"
225+
]
226+
}
227+
}
228+
},
229+
"else": {
230+
"properties": {
231+
"control_scheme": {
232+
"title": "Control Scheme",
233+
"description": "Set a default scheme for this camera.",
234+
"type": "string",
235+
"enum": [
236+
"locked_player_relative_strafe",
237+
"camera_relative",
238+
"player_relative",
239+
"player_relative_strafe"
240+
]
241+
}
242+
}
243+
}
244+
}
245+
]
246+
}
247+
}
248+
}

0 commit comments

Comments
 (0)