mirror of
https://github.com/Jacobwasbeast/LegacyWeaveLoader.git
synced 2026-05-25 23:24:31 +00:00
rework(docs): better, more readable docs
This commit is contained in:
48
docs/API_REFERENCE.md
Normal file
48
docs/API_REFERENCE.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# API Reference (Short)
|
||||
|
||||
## Registry.Block
|
||||
|
||||
```csharp
|
||||
RegisteredBlock Register(string id, BlockProperties properties)
|
||||
```
|
||||
|
||||
Creates a block and its inventory item.
|
||||
|
||||
## Registry.Item
|
||||
|
||||
```csharp
|
||||
RegisteredItem Register(string id, ItemProperties properties)
|
||||
```
|
||||
|
||||
Creates a new item.
|
||||
|
||||
## Registry.Recipe
|
||||
|
||||
```csharp
|
||||
void AddFurnace(string inputId, string outputId, float xp)
|
||||
```
|
||||
|
||||
Adds a furnace recipe.
|
||||
|
||||
## GameEvents
|
||||
|
||||
```csharp
|
||||
event EventHandler<BlockBreakEventArgs> OnBlockBreak;
|
||||
event EventHandler<BlockPlaceEventArgs> OnBlockPlace;
|
||||
event EventHandler<ChatEventArgs> OnChat;
|
||||
event EventHandler<EntitySpawnEventArgs> OnEntitySpawn;
|
||||
event EventHandler<PlayerJoinEventArgs> OnPlayerJoin;
|
||||
```
|
||||
|
||||
## Logger
|
||||
|
||||
```csharp
|
||||
Logger.Debug(string message)
|
||||
Logger.Info(string message)
|
||||
Logger.Warning(string message)
|
||||
Logger.Error(string message)
|
||||
```
|
||||
|
||||
## Identifier
|
||||
|
||||
Namespaced IDs use `"namespace:path"` (for example, `"mymod:ruby_ore"`). If no namespace is provided, `"minecraft"` is assumed.
|
||||
Reference in New Issue
Block a user