Skip to content

Commit 5bdb64e

Browse files
committed
Initial update of block entities for 1.17
1 parent f399265 commit 5bdb64e

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
3+
*
4+
* Copyright (c) SpongePowered <https://www.spongepowered.org>
5+
* Copyright (c) contributors
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*/
25+
package org.spongepowered.api.block.entity;
26+
27+
public interface SculkSensor extends BlockEntity {
28+
29+
}

src/main/java/org/spongepowered/api/block/entity/Sign.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import net.kyori.adventure.text.Component;
2828
import org.spongepowered.api.data.Keys;
2929
import org.spongepowered.api.data.value.ListValue;
30-
import org.spongepowered.api.service.permission.Subject;
30+
import org.spongepowered.api.data.value.Value;
3131
import org.spongepowered.api.util.Nameable;
3232

3333
/**
@@ -45,4 +45,11 @@ default ListValue.Mutable<Component> lines() {
4545
return this.requireValue(Keys.SIGN_LINES).asMutable();
4646
}
4747

48+
/**
49+
* {@return Whether this sign has glowing text}.
50+
*/
51+
default Value.Mutable<Boolean> glowingText() {
52+
return this.requireValue(Keys.GLOWING_TEXT).asMutable();
53+
}
54+
4855
}

src/main/java/org/spongepowered/api/data/Keys.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,12 @@ public final class Keys {
921921
*/
922922
public static final Key<Value<Integer>> GENERATION = Keys.key(ResourceKey.sponge("generation"), Integer.class);
923923

924+
/**
925+
* Whether a {@link Sign} has glowing text (from dying
926+
* with {@link ItemTypes#GLOW_INK_SAC}).
927+
*/
928+
public static final Key<Value<Boolean>> GLOWING_TEXT = Keys.key(ResourceKey.sponge("glowing_text"), Boolean.class);
929+
924930
/**
925931
* The "growth stage" state of a {@link BlockState}.
926932
* e.g. {@link BlockTypes#CACTUS} or {@link BlockTypes#WHEAT} etc.

0 commit comments

Comments
 (0)