-
-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
685c0d7
commit acb44bc
Showing
8 changed files
with
231 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...ain/java/org/spongepowered/api/data/manipulator/immutable/entity/ImmutableParrotData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* 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.manipulator.immutable.entity; | ||
|
||
import org.spongepowered.api.data.manipulator.immutable.ImmutableVariantData; | ||
import org.spongepowered.api.data.manipulator.mutable.entity.ParrotData; | ||
import org.spongepowered.api.data.type.ParrotVariant; | ||
import org.spongepowered.api.entity.living.animal.Parrot; | ||
|
||
/** | ||
* A type of {@link ImmutableVariantData} for {@link ParrotVariant}s belonging | ||
* to an {@link Parrot}. | ||
*/ | ||
public interface ImmutableParrotData extends ImmutableVariantData<ParrotVariant, ImmutableParrotData, ParrotData> { | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/org/spongepowered/api/data/manipulator/mutable/entity/ParrotData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* 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.manipulator.mutable.entity; | ||
|
||
import org.spongepowered.api.data.manipulator.immutable.entity.ImmutableParrotData; | ||
import org.spongepowered.api.data.manipulator.mutable.VariantData; | ||
import org.spongepowered.api.data.type.ParrotVariant; | ||
import org.spongepowered.api.entity.living.animal.Parrot; | ||
|
||
/** | ||
* A type of {@link VariantData} for {@link ParrotVariant}s belonging | ||
* to an {@link Parrot}. | ||
*/ | ||
public interface ParrotData extends VariantData<ParrotVariant, ParrotData, ImmutableParrotData> { | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/org/spongepowered/api/data/type/ParrotVariant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* 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.CatalogType; | ||
import org.spongepowered.api.entity.living.animal.Parrot; | ||
import org.spongepowered.api.util.annotation.CatalogedBy; | ||
|
||
/** | ||
* Represents the variant of a {@link Parrot}. | ||
*/ | ||
@CatalogedBy(ParrotVariants.class) | ||
public interface ParrotVariant extends CatalogType { | ||
|
||
} |
50 changes: 50 additions & 0 deletions
50
src/main/java/org/spongepowered/api/data/type/ParrotVariants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* 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.util.generator.dummy.DummyObjectProvider; | ||
|
||
/** | ||
* An enumeration of known vanilla {@link OcelotType}s. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
*/ | ||
public final class ParrotVariants { | ||
|
||
// SORTFIELDS:ON | ||
|
||
public static final ParrotVariant BLUE = DummyObjectProvider.createFor(ParrotVariant.class, "BLUE"); | ||
|
||
public static final ParrotVariant CYAN = DummyObjectProvider.createFor(ParrotVariant.class, "CYAN"); | ||
|
||
public static final ParrotVariant GRAY = DummyObjectProvider.createFor(ParrotVariant.class, "GRAY"); | ||
|
||
public static final ParrotVariant GREEN = DummyObjectProvider.createFor(ParrotVariant.class, "GREEN"); | ||
|
||
public static final ParrotVariant RED = DummyObjectProvider.createFor(ParrotVariant.class, "RED"); | ||
|
||
// SORTFIELDS:OFF | ||
|
||
private ParrotVariants() { | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
src/main/java/org/spongepowered/api/entity/living/animal/Parrot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* 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.entity.living.animal; | ||
|
||
import org.spongepowered.api.data.key.Keys; | ||
import org.spongepowered.api.data.manipulator.mutable.entity.ParrotData; | ||
import org.spongepowered.api.data.type.ParrotVariant; | ||
import org.spongepowered.api.data.value.mutable.Value; | ||
|
||
/** | ||
* Represents a parrot. | ||
*/ | ||
public interface Parrot extends Animal { | ||
|
||
/** | ||
* Gets a copy of the current {@link ParrotData} being represented by | ||
* this {@link Parrot}. | ||
* | ||
* @return A copy of the current parrot data | ||
*/ | ||
default ParrotData getParrotData() { | ||
return this.get(ParrotData.class).get(); | ||
} | ||
|
||
/** | ||
* Gets the {@link Value} for the {@link ParrotVariant} of this | ||
* {@link Parrot}. | ||
* | ||
* @return The parrot variant value | ||
*/ | ||
default Value<ParrotVariant> variant() { | ||
return this.getValue(Keys.PARROT_VARIANT).get(); | ||
} | ||
|
||
} |
This says "OcelotType"