Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/main/java/org/spongepowered/api/block/entity/SculkSensor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.block.entity;

public interface SculkSensor extends BlockEntity {

}
9 changes: 8 additions & 1 deletion src/main/java/org/spongepowered/api/block/entity/Sign.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import net.kyori.adventure.text.Component;
import org.spongepowered.api.data.Keys;
import org.spongepowered.api.data.value.ListValue;
import org.spongepowered.api.service.permission.Subject;
import org.spongepowered.api.data.value.Value;
import org.spongepowered.api.util.Nameable;

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

/**
* {@return Whether this sign has glowing text}.
*/
default Value.Mutable<Boolean> glowingText() {
return this.requireValue(Keys.GLOWING_TEXT).asMutable();
}

}
47 changes: 45 additions & 2 deletions src/main/java/org/spongepowered/api/data/Keys.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import org.spongepowered.api.data.type.ChestAttachmentType;
import org.spongepowered.api.data.type.ComparatorMode;
import org.spongepowered.api.data.type.DoorHinge;
import org.spongepowered.api.data.type.DripstoneSegment;
import org.spongepowered.api.data.type.DyeColor;
import org.spongepowered.api.data.type.FoxType;
import org.spongepowered.api.data.type.HandPreference;
Expand All @@ -78,12 +79,14 @@
import org.spongepowered.api.data.type.ProfessionType;
import org.spongepowered.api.data.type.RabbitType;
import org.spongepowered.api.data.type.RailDirection;
import org.spongepowered.api.data.type.SculkSensorState;
import org.spongepowered.api.data.type.SkinPart;
import org.spongepowered.api.data.type.SlabPortion;
import org.spongepowered.api.data.type.SpellType;
import org.spongepowered.api.data.type.SpellTypes;
import org.spongepowered.api.data.type.StairShape;
import org.spongepowered.api.data.type.StructureMode;
import org.spongepowered.api.data.type.Tilt;
import org.spongepowered.api.data.type.TropicalFishShape;
import org.spongepowered.api.data.type.VillagerType;
import org.spongepowered.api.data.type.WireAttachmentType;
Expand Down Expand Up @@ -514,6 +517,11 @@ public final class Keys {
*/
public static final Key<Value<Boolean>> CAN_PLACE_AS_BLOCK = Keys.key(ResourceKey.sponge("can_place_as_block"), Boolean.class);

/**
* The number of candles within a candle block.
*/
public static final Key<Value<Integer>> CANDLES = Keys.key(ResourceKey.sponge("candles"), Integer.class);

/**
* The current casting time of a {@link Spellcaster}.
*/
Expand Down Expand Up @@ -694,6 +702,11 @@ public final class Keys {
*/
public static final Key<Value<Boolean>> DO_EXACT_TELEPORT = Keys.key(ResourceKey.sponge("do_exact_teleport"), Boolean.class);

/**
* The type of dripstone a certain {@link BlockTypes#DRIPSTONE_BLOCK} represents.
*/
public static final Key<Value<DripstoneSegment>> DRIPSTONE_SEGMENT = Keys.key(ResourceKey.sponge("dripstone_segment"), DripstoneSegment.class);

/**
* The remaining duration (in ticks) of an {@link AreaEffectCloud}.
*/
Expand Down Expand Up @@ -921,6 +934,12 @@ public final class Keys {
*/
public static final Key<Value<Integer>> GENERATION = Keys.key(ResourceKey.sponge("generation"), Integer.class);

/**
* Whether a {@link Sign} has glowing text (from dying
* with {@link ItemTypes#GLOW_INK_SAC}).
*/
public static final Key<Value<Boolean>> GLOWING_TEXT = Keys.key(ResourceKey.sponge("glowing_text"), Boolean.class);

/**
* The "growth stage" state of a {@link BlockState}.
* e.g. {@link BlockTypes#CACTUS} or {@link BlockTypes#WHEAT} etc.
Expand All @@ -937,6 +956,12 @@ public final class Keys {
*/
public static final Key<Value<Boolean>> HAS_BASE_PLATE = Keys.key(ResourceKey.sponge("has_base_plate"), Boolean.class);

/**
* Whether a {@link BlockTypes#CAVE_VINES} or
* {@link BlockTypes#CAVE_VINES_PLANT} has glow berries.
*/
public static final Key<Value<Boolean>> HAS_BERRIES = Keys.key(ResourceKey.sponge("has_berries"), Boolean.class);

/**
* Whether a {@link PackHorse} has a chest.
*/
Expand Down Expand Up @@ -2281,6 +2306,11 @@ public final class Keys {
*/
public static final Key<SetValue<String>> SCOREBOARD_TAGS = Keys.setKey(ResourceKey.sponge("scoreboard_tags"), String.class);

/**
* The triggering state of a {@link BlockTypes#SCULK_SENSOR}.
*/
public static final Key<Value<SculkSensorState>> SCULK_SENSOR_STATE = Keys.key(ResourceKey.sponge("sculk_sensor_state"), SculkSensorState.class);

/**
* A {@link Beacon}'s secondary effect.
*/
Expand All @@ -2297,7 +2327,7 @@ public final class Keys {
public static final Key<Value<ProjectileSource>> SHOOTER = Keys.key(ResourceKey.sponge("shooter"), ProjectileSource.class);

/**
* Whether a {@link EndCrystal} should show it's bottom bedrock platform.
* Whether a {@link EndCrystal} should show its bottom bedrock platform.
*/
public static final Key<Value<Boolean>> SHOW_BOTTOM = Keys.key(ResourceKey.sponge("show_bottom"), Boolean.class);

Expand Down Expand Up @@ -2547,6 +2577,12 @@ public final class Keys {
*/
public static final Key<Value<Ticks>> TICKS_REMAINING = Keys.key(ResourceKey.sponge("ticks_remaining"), Ticks.class);

/**
* The tilt of a {@link BlockTypes#BIG_DRIPLEAF} block, as triggered by
* player motion.
*/
public static final Key<Value<Tilt>> TILT = Keys.key(ResourceKey.sponge("tilt"), Tilt.class);

/**
* The {@link ItemTier} of an {@link ItemStack} tool.
* Readonly
Expand Down Expand Up @@ -2600,9 +2636,16 @@ public final class Keys {
*/
public static final Key<Value<Boolean>> UNSTABLE = Keys.key(ResourceKey.sponge("unstable"), Boolean.class);

/**
* Whether a {@link BlockTypes#POINTED_DRIPSTONE} is facing up or down.
*
* <p>Only supports {@link Direction#UP} or {@link Direction#DOWN}</p>
*/
public static final Key<Value<Direction>> UP_OR_DOWN = Keys.key(ResourceKey.sponge("up_or_down"), Direction.class);

/**
* Whether changes to {@link Keys#SKIN_PROFILE_PROPERTY} should
* be reflected in an entitie's {@link GameProfile}.
* be reflected in an entity's {@link GameProfile}.
*/
public static final Key<Value<Boolean>> UPDATE_GAME_PROFILE = Keys.key(ResourceKey.sponge("update_game_profile"), Boolean.class);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.data.type;

import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(DripstoneSegments.class)
public interface DripstoneSegment extends DefaultedRegistryValue {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.data.type;

import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.registry.DefaultedRegistryReference;
import org.spongepowered.api.registry.RegistryKey;
import org.spongepowered.api.registry.RegistryScope;
import org.spongepowered.api.registry.RegistryScopes;
import org.spongepowered.api.registry.RegistryTypes;

@SuppressWarnings("unused")
@RegistryScopes(scopes = RegistryScope.GAME)
public final class DripstoneSegments {

public static final DefaultedRegistryReference<DripstoneSegment> TIP_MERGE = DripstoneSegments.key(ResourceKey.sponge("tip_merge"));

public static final DefaultedRegistryReference<DripstoneSegment> TIP = DripstoneSegments.key(ResourceKey.sponge("tip"));

public static final DefaultedRegistryReference<DripstoneSegment> FRUSTUM = DripstoneSegments.key(ResourceKey.sponge("frustum"));

public static final DefaultedRegistryReference<DripstoneSegment> MIDDLE = DripstoneSegments.key(ResourceKey.sponge("middle"));

public static final DefaultedRegistryReference<DripstoneSegment> BASE = DripstoneSegments.key(ResourceKey.sponge("base"));

private DripstoneSegments() {
}

private static DefaultedRegistryReference<DripstoneSegment> key(final ResourceKey location) {
return RegistryKey.of(RegistryTypes.DRIPSTONE_SEGMENT, location).asDefaultedReference(() -> Sponge.game().registries());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.data.type;

import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(SculkSensorStates.class)
public interface SculkSensorState extends DefaultedRegistryValue {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.data.type;

import org.spongepowered.api.ResourceKey;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.registry.DefaultedRegistryReference;
import org.spongepowered.api.registry.RegistryKey;
import org.spongepowered.api.registry.RegistryScope;
import org.spongepowered.api.registry.RegistryScopes;
import org.spongepowered.api.registry.RegistryTypes;

@SuppressWarnings("unused")
@RegistryScopes(scopes = RegistryScope.GAME)
public final class SculkSensorStates {

// @formatter:off
// SORTFIELDS:ON

public static final DefaultedRegistryReference<SculkSensorState> INACTIVE = SculkSensorStates.key(ResourceKey.sponge("inactive"));

public static final DefaultedRegistryReference<SculkSensorState> ACTIVE = SculkSensorStates.key(ResourceKey.sponge("active"));

public static final DefaultedRegistryReference<SculkSensorState> COOLDOWN = SculkSensorStates.key(ResourceKey.sponge("cooldown"));

// SORTFIELDS:OFF
// @formatter:on

private SculkSensorStates() {
}

private static DefaultedRegistryReference<SculkSensorState> key(final ResourceKey location) {
return RegistryKey.of(RegistryTypes.SCULK_SENSOR_STATE, location).asDefaultedReference(() -> Sponge.game().registries());
}

}
39 changes: 39 additions & 0 deletions src/main/java/org/spongepowered/api/data/type/Tilt.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.spongepowered.api.data.type;

import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(Tilts.class)
public interface Tilt extends DefaultedRegistryValue {

/**
* {@return Whether a block entering this tilt state will trigger any
* vibration-based blocks}.
*/
boolean triggersVibrations();

}
Loading