-
-
Notifications
You must be signed in to change notification settings - Fork 22
KubeJS Integration
mortuusars edited this page May 11, 2024
·
2 revisions
[client]
[server]
- cancelable
- Fired when Camera tries to take a photo. Can be canceled to prevent capturing an image.
- Client-side event wouldn't fire if server-side event was canceled.
- If canceled only on the client - shutter would be opened, but the image would not be captured and frame wouldn't be added to a film.
Available methods/properties:
-
getEntity()/getPlayer()
- player that used a Camera -
getCameraStack()
- Camera item stack that was used -
int getLightLevel()
- light level at the player position -
boolean shouldFlashFire()
- if the flash will attempt to fire (can fail due to obstructions)
[server]
- Can be used to add additional data to the frame or modify existing data. This data can be used in advancements or quests afterward.
Available methods/properties:
-
getEntity()/getPlayer()
- player that used a Camera -
getCameraStack()
- Camera item stack that was used -
getFrame()
- NBT-tag with frame data -
getEntitiesInFrame()
- list of entities that were captured on the frame
[server]
- Fired at the very end of a shot, after frame is added to a film.
Available methods/properties:
-
getEntity()/getPlayer()
- player that used a Camera -
getCameraStack()
- Camera item stack that was used -
getFrame()
- NBT-tag with frame data
Same events are available as regular java forge/fabric events