Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Update Events.md
Browse files Browse the repository at this point in the history
  • Loading branch information
melontini authored Apr 30, 2024
1 parent 12ea55e commit 7eb4b67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/develop/Events.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ EventType.builder()
.build(new Identifier("modid", "custom_event"));
```

Events can aceepts additional parameters using `extension()`. After specifying an extension you can return a custom type.
Events can accept additional parameters using `extension()`. After specifying an extension you can return a custom type.

```java
EventType.builder()
Expand Down Expand Up @@ -53,7 +53,7 @@ private static LootContext makeContext(ServerWorld world, Entity entity, Vec3d o

If you did specify an extension, or are using an unsupported return type, you'll have to write custom resolution logic.

To do that you'll simple have to create an `EventContext`. `EventContext` is used to pass execution parameters to commands.
To do that you'll simply have to create an `EventContext`. `EventContext` is used to pass execution parameters to commands.

```java
EventContext context = EventContext.builder(type)
Expand All @@ -66,4 +66,4 @@ To get the return value, you can call `getReturnValue(def)`, the default value c
```java
boolean val = context.getReturnValue(def);
if (val != def) return val;
```
```

0 comments on commit 7eb4b67

Please sign in to comment.