Skip to content

Commit a9f6309

Browse files
committed
Merge api8 fixes into api9
Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
2 parents d353605 + 887e40e commit a9f6309

File tree

4 files changed

+105
-1
lines changed

4 files changed

+105
-1
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Feature or Implementation Request for Sponge Implementations
4+
url: https://github.com/SpongePowered/Sponge/issues/new?assignees=&labels=status%3A+needs+triage%2Ctype%3A+feature+request&template=feature_request.yml
5+
about: "If you're using an API and it fails with an abstract method or no class def error, report it here."
6+
- name: Bug report for Sponge for Minecraft 1.16.5 or later
7+
url: https://github.com/SpongePowered/Sponge/issues/new?assignees=&labels=status%3A+needs+triage%2Ctype%3A+bug&template=bug_report.yml
8+
about: "If you've discovered a bug with Sponge itself, report that here."
9+
- name: Bug report for SpongeForge for Minecraft 1.12.2
10+
url: https://github.com/SpongePowered/SpongeForge/issues/new?assignees=&labels=&template=legacy_issue.yml
11+
about: "Issues for SpongeForge for Minecraft 1.12.2 should be reported on the SpongeForge repository."
12+
- name: Bug report for SpongeVanilla for Minecraft 1.12.2
13+
url: https://github.com/SpongePowered/SpongeVanilla/issues/new?assignees=&labels=&template=legacy_issue.yml
14+
about: "Issues for SpongeVanilla for Minecraft 1.12.2 should be reported on the SpongeVanilla repository."
15+
- name: Known Mod Incompatibilities
16+
url: https://docs.spongepowered.org/stable/en/server/spongineer/incompatible.html
17+
about: "If you're potentially having issues with mod conflicts, read this page. You may simply need to change a mod or sponge setting."
18+
- name: Sponge Docs
19+
url: https://docs.spongepowered.org/
20+
about: "If you need help setting up a server, our Docs pages may help you."
21+
- name: Sponge Forums
22+
url: https://forums.spongepowered.org/
23+
about: "If you need support running your server and want to ask a question, post on our official forums"
24+
- name: Sponge Discord Guild
25+
url: https://discord.gg/sponge
26+
about: "For quick help, join our Discord channel!"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Request Addition or Change to API
2+
description: If you want a new API or are requesting a change to an API, ask here.
3+
labels: [ "status: needs triage" ]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: "## Before You Begin"
8+
- type: markdown
9+
attributes:
10+
value: >
11+
This is for requesting a new API to an existing version of the SpongeAPI, or for requesting a change that will
12+
appear in newer versions of the API. This is **not** for reporting errors when trying to use an API in one of
13+
our implementations - if you are getting `AbtractMethodError`s or `NoClassDefError`s, [please report that to the
14+
Sponge repository instead](https://github.com/SpongePowered/Sponge/issues/new/choose).
15+
16+
17+
Please make sure you have searched existing issues to see if someone else has made the same request as you first.
18+
We will close duplicates.
19+
20+
21+
Remember, Github Issues is not for support. If you require help, visit the
22+
[Sponge Docs](https://docs.spongepowered.org), our [Forums](https://forums.spongepowered.org) or
23+
[Discord Server](https://discord.gg/sponge).
24+
- type: input
25+
id: version
26+
attributes:
27+
label: Major SpongeAPI version
28+
description: What major version of the API do you want this to target?
29+
placeholder: ex. 8, 9
30+
validations:
31+
required: true
32+
- type: dropdown
33+
id: breakingchange
34+
attributes:
35+
label: Is this likely to be a breaking change?
36+
description: >
37+
A breaking change can be, but is not limited to:
38+
39+
40+
* A method is removed from an class/interface
41+
42+
* A method's signature is changed (including the number of parameters, the types of those parameters, and
43+
the return type of a method) instead of adding an overload (note that changing a return type from `void` to
44+
something else, such as `boolean` is still a breaking change).
45+
46+
* A class/interface is removed or renamed, or is converted between a class and an interface
47+
48+
* The inheritance tree is modified (other than simply being added to)
49+
50+
51+
If you are unsure, select "I don't know". **Breaking changes can only target unreleased major versions.**
52+
options:
53+
- "Yes"
54+
- "No"
55+
- "I don't know"
56+
validations:
57+
required: true
58+
- type: textarea
59+
id: what-do-you-want
60+
attributes:
61+
label: What are you requesting?
62+
description: >
63+
Explain what what you're requesting and why you're requesting it. Please add as much detail as you can.
64+
Feel free to give suggestions as to the form of the API you want - it doesn't need to be exact at this stage
65+
as we may help you refine your idea.
66+
validations:
67+
required: true
68+

src/main/java/org/spongepowered/api/event/world/chunk/ChunkEvent.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.spongepowered.api.event.Cancellable;
2929
import org.spongepowered.api.event.Event;
3030
import org.spongepowered.api.util.annotation.eventgen.NoFactoryMethod;
31+
import org.spongepowered.api.world.World;
3132
import org.spongepowered.api.world.chunk.Chunk;
3233
import org.spongepowered.api.world.chunk.WorldChunk;
3334
import org.spongepowered.api.world.server.ServerWorld;
@@ -125,7 +126,11 @@ interface Generated extends WorldScoped {
125126
}
126127

127128
/**
128-
* Called when a {@link WorldChunk chunk} is done loading.
129+
* Called when a {@link WorldChunk chunk} is loaded. This can be called
130+
* outside the {@link World#engine() main} {@link Thread}. It is NOT safe
131+
* to perform modifications to the {@link World} or via
132+
* {@link org.spongepowered.api.world.server.ServerLocation} as this could
133+
* result in a deadlock.
129134
*/
130135
interface Load extends WorldScoped {
131136

src/main/java/org/spongepowered/api/world/server/ServerWorld.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ default UUID uniqueId() {
8282
return this.properties().uniqueId();
8383
}
8484

85+
@Override
86+
default WorldChunk chunkAtBlock(final Vector3i blockPosition) {
87+
return this.chunkAtBlock(blockPosition.x(), blockPosition.y(), blockPosition.z());
88+
}
89+
8590
@Override
8691
default WorldChunk chunkAtBlock(final int bx, final int by, final int bz) {
8792
final Vector3i chunkPos = this.engine().chunkLayout().forceToChunk(bx, by, bz);

0 commit comments

Comments
 (0)