Skip to content

Commit 323e1e6

Browse files
authored
Add UNKNOWN portal type, make generatePortal return a boolean (#2386)
1 parent b8c5a38 commit 323e1e6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/java/org/spongepowered/api/world/portal/PortalType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ public interface PortalType extends DefaultedRegistryValue {
4949
*
5050
* @param location The location
5151
* @param axis The axis
52+
* @return true if a portal could be generated
5253
*/
53-
void generatePortal(ServerLocation location, Axis axis);
54+
boolean generatePortal(ServerLocation location, Axis axis);
5455

5556
/**
5657
* Finds a {@link Portal} from a {@link ServerLocation location}.

src/main/java/org/spongepowered/api/world/portal/PortalTypes.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ public final class PortalTypes {
4040

4141
// SORTFIELDS:ON
4242

43+
public static final DefaultedRegistryReference<PortalType> END = PortalTypes.key(ResourceKey.sponge("end"));
44+
4345
public static final DefaultedRegistryReference<PortalType> NETHER = PortalTypes.key(ResourceKey.sponge("nether"));
4446

45-
public static final DefaultedRegistryReference<PortalType> END = PortalTypes.key(ResourceKey.sponge("end"));
47+
public static final DefaultedRegistryReference<PortalType> UNKNOWN = PortalTypes.key(ResourceKey.sponge("unknown"));
4648

4749
// SORTFIELDS:OFF
4850

0 commit comments

Comments
 (0)