API Changelog 0.7.5.2

A new update is now available, introducing a lot of new content!
Latest hotfix: 0.7.5.1 (2024-09-02)
  • Plugin API 0.7.5 (2024-08-30):

    • [New] New UI element: UIScrollView
    • [New] New PostProcessing object to modify post-processing effects, either applied to a volume, or to a player directly
    • [New] New PostProcessingVolume game object
    • [New] GameObject.attachTo() (to attach a game object to a player or npc)
    • [New] Vehicle API is now available (see World.getVehicle(), World.spawnVehicle(), World.getAllVehicles() etc)
    • [New] Added Vehicle definitions (see Vehicles.VehicleDefinition() and Definitions.getVehicleDefinition())
    • [New] World.createConstructionElements() (accepting a ConstructionPlaceBatch)
    • [New] World.createPlants() (accepting a PlantPlaceBatch)
    • [New] World.createStorage()
    • [New] World.getStorage()
    • [New] World.getAllStorages()
    • [New] World.getNumStorages()
    • [New] World.triggerExplosion()
    • [New] World.getAllNpcs() with optional typeID filter
    • [New] Area.getDefaultPermission()
    • [New] Server.getLogFilePath()
    • [New] Npc.getEquippedItem()
    • [New] Npc.getSecondaryItem()
    • [New] Npc.setBehaviour() and Npc.resetBehaviour()
    • [New] Npc.setAttackReaction() and Npc.resetAttackReaction()
    • [New] Npc.setInvisible() and Npc.isInvisible()
    • [New] Npc.setSoundsEnabled()
    • [New] Npc.playIdleSound(), Npc.playAlertSound(), Npc.playDeathSound()
    • [New] Npc.setColliderEnabled() and Npc.isColliderEnabled()
    • [New] Npc.setInteractable() and Npc.isInteractable()
    • [New] Npc.getPlayerInLineOfSight()
    • [New] Npc.isOnlyAliveDuringNight()
    • [New] Chunk.getAllObjects()
    • [New] Chunk.getAllConstructionElements()
    • [New] Chunk.getAllPlants()
    • [New] Storage.addItem() and Storage.addItemToSlot()
    • [New] Storage.addObjectItem() and Storage.addObjectToSlot()
    • [New] Storage.addConstructionItem() and Storage.addConstructionItemToSlot()
    • [New] Storage.addClothingItem() and Storage.addClothingItemToSlot()
    • [New] Storage.getCreationDate()
    • [New] Storage.getLastModifyPlayerDbID()
    • [New] Inventory.getEquippedItemSlot()
    • [New] Inventory.getEquippedItemSlotType()
    • [New] Item.destroy()
    • [New] Item.ConstructionItem.setConstructionID()
    • [New] Item.ConstructionItem.setColor()
    • [New] WorldItem.getRelatedMetaObject()
    • [New] WorldItem.getProgress() and WorldItem.setProgress
    • [New] MetaObject.getItems() and MetaObject.setItems()
    • [New] MetaObject.triggerUpdate()
    • [New] Internals.setSceneElementActive()
    • [New] Internals.setSceneElementParent()
    • [New] Internals.setSceneElementLocalPosition()
    • [New] Internals.setSceneElementLocalRotation()
    • [New] Internals.setSceneElementLocalScale()
    • [New] Internals.overwriteInnerUIStyle()
    • [New] Player.getPostProcessing()
    • [New] Player.getAllGameObjects()
    • [New] Player.getAllUIElements()
    • [New] Player.getLocalTimeZoneOffset()
    • [New] Player.getPreviousPosition()
    • [New] Player.getWorldPartPosition() and Player.getSectorPosition()
    • [New] Player.getAltitude() (same as Player.getPosition().y)
    • [New] Player.showFontDialog()
    • [New] Time.getMoonPhase()
    • [New] Style.scale property (UIElements)
    • [New] Style.copy() method (to copy all properties from another style)
    • [New] GameObject.getPluginID() and UIElement.getPluginID()
    • [New] ItemDefinition.getIcon(), ObjectDefinition.getIcon() and ConstructionDefinition.getIcon()
    • [New] PlayerPlaceConstructionEvent.getGlobalIDs() (if multiple blocks were placed)
    • [New] PlayerPlaceConstructionEvent.getMultiPlaceGap() and setMultiPlaceGap()
    • [New] PlayerChangeBlockPositionEvent.getNewChunkPosition() and getOldChunkPosition()
    • [New] PlayerEnterAreaEvent.getNewPlayerPosition() and getOldPlayerPosition()
    • [New] PlayerEnterChunkEvent.getNewPlayerPosition(), getOldPlayerPosition(), getNewBlockPosition() and getOldBlockPosition()
    • [New] PlayerEnterSectorEvent.getNewPlayerPosition() and getOldPlayerPosition()
    • [New] PlayerEnterWorldPartEvent.getNewPlayerPosition() and getOldPlayerPosition()
    • [New] PlayerLeaveAreaEvent.getNewPlayerPosition() and getOldPlayerPosition()
    • [New] PlayerHitTerrain.setDamage()
    • [New] Added getPlant() to PlayerVegetationEvents, getObject() to PlayerObjectEvents and getConstructionElement() to PlayerConstructionEvents
    • [New] GameObjects support custom attributes now
    • [New] Quaternion.inverse() (to calculate the inverse of a quaternion)
    • [New] Event: ProcessWorldItemEvent (called when a world item is processed, e.g. by a furnace, grinder etc)
    • [New] Event: PlayerProcessItemEvent (called when player cuts watermelon, slices bread, fills canteen etc)
    • [New] Event: MetaObjectStatusChangeEvent (called when the status of a meta object changes, e.g furnace or oven)
    • [New] Event: ProjectileFireEvent and ProjectileHitEvent (whenever a projectile is fired or hit a target)
    • [New] Event: PlayerToggleInventoryEvent (when player opens/closes his inventory)
    • [New] Event: PlayerUITextFieldChangeEvent (when text field content is changed)
    • [New] Event: ReadyEvent (called when the dedicated server is fully started and ready)
    • [Change] WorldDatabase ResultSet indices now begin at 1 instead of 0 (to make this consistent with the JDBC implementation) :warning:
    • [Change] AddAdminEvent.getPlayerUID() and RemoveAdminEvent.getPlayerUID() now return a String (!)
    • [Change] Utils.ChunkUtils.getBlockPosition() methods now provide reliable results
    • [Bugfix] Fixed various native crashes caused by uncaught exceptions during JNI call
    • [Bugfix] Fixed raycasts not properly recognizing the local player
    • [Bugfix] Fixed plants or objects created via World.createPlant()/World.createObject() having an invalid global ID
    • [Bugfix] Fixed crash when creating saplings via World.createPlant()
    • [Bugfix] Fixed Player.getState() not returning the correct state if the player is dead
    • [Bugfix] Fixed Player.setInvisible()
    • [Bugfix] Fixed Player.shake()
    • [Bugfix] Fixed Player.setMaxStamina()
    • [Bugfix] Fixed Player.setListenForMouseInput() sometimes not working correctly
    • [Bugfix] Fixed Player.showColorPicker() callback not being invoked
    • [Bugfix] Fixed Sound.stop() not working
    • [Bugfix] Fixed PlayerHitTerrainEvent not being cancellable


    Plugin API 0.7.5.1 (2024-09-02):

    • [Bugfix] Fixed flickering UI elements on hover


    Plugin API 0.7.5.2 (2024-09-02):

    • [Bugfix] Npc.getNearestPlayer() no longer returns null if invoked from NpcSpawnEvent
    • [Bugfix] Npc methods (getPosition() etc) now work properly if invoked from NpcSpawnEvent
    • [Bugfix] Fixed Npc.setAlerted(false) not working
    • [Bugfix] Fixed item icon sometimes being invisible after cancelling PlayerDropItemEvent




    This version uses Unity 2023.1.20. This is relevant if you want to build asset bundles containing custom shaders or VFX effects

    Edited 2 times, last by red51: Update 0.7.5.2 ().

  • red51

    Changed the title of the thread from “API Changelog 0.7.5” to “API Changelog 0.7.5.2”.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!