Skip to content

Commit 3eb606a

Browse files
committed
API8 Keys
1 parent 07b4c89 commit 3eb606a

File tree

30 files changed

+1031
-1059
lines changed

30 files changed

+1031
-1059
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public interface Banner extends NameableBlockEntity {
4141
* @return The value for the base color
4242
*/
4343
default Value.Mutable<DyeColor> baseColor() {
44-
return this.requireValue(Keys.BANNER_BASE_COLOR).asMutable();
44+
return this.requireValue(Keys.DYE_COLOR).asMutable();
4545
}
4646

4747
/**

src/main/java/org/spongepowered/api/block/entity/carrier/Beacon.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/**
3434
* Represents a Beacon.
3535
*
36-
* <p>Beacons apply prescribed effects according to the {@link Keys#BEACON_PRIMARY_EFFECT}.
36+
* <p>Beacons apply prescribed effects according to the {@link Keys#PRIMARY_EFFECT}.
3737
* Depending on the completed levels of the beacon, the effects may be applied
3838
* at a further range or shorter range.</p>
3939
*/
@@ -54,7 +54,7 @@ public interface Beacon extends NameableCarrierBlockEntity {
5454
* @return The optional value for the primary potion effect
5555
*/
5656
default Optional<Value.Mutable<PotionEffectType>> primaryEffect() {
57-
return this.getValue(Keys.BEACON_PRIMARY_EFFECT).map(Value::asMutable);
57+
return this.getValue(Keys.PRIMARY_EFFECT).map(Value::asMutable);
5858
}
5959

6060
/**
@@ -64,7 +64,7 @@ default Optional<Value.Mutable<PotionEffectType>> primaryEffect() {
6464
* @return The optional value for the secondary potion effect
6565
*/
6666
default Optional<Value.Mutable<PotionEffectType>> secondaryEffect() {
67-
return this.getValue(Keys.BEACON_SECONDARY_EFFECT).map(Value::asMutable);
67+
return this.getValue(Keys.SECONDARY_EFFECT).map(Value::asMutable);
6868
}
6969

7070
}

src/main/java/org/spongepowered/api/block/entity/carrier/BrewingStand.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import org.spongepowered.api.data.Keys;
2828
import org.spongepowered.api.data.value.BoundedValue;
29-
import org.spongepowered.api.data.value.Value;
3029
import org.spongepowered.api.item.ItemTypes;
3130

3231
/**
@@ -35,14 +34,14 @@
3534
public interface BrewingStand extends NameableCarrierBlockEntity {
3635

3736
/**
38-
* {@link Keys#BREWING_STAND_FUEL}
37+
* {@link Keys#FUEL}
3938
*
4039
* <p>Note 1 {@link ItemTypes#BLAZE_POWDER} supplies 20 fuel</p>
4140
*
4241
* @return The amount of fuel left in the brewing stand.
4342
*/
4443
default BoundedValue.Mutable<Integer> fuel() {
45-
return this.requireValue(Keys.BREWING_STAND_FUEL).asMutable();
44+
return this.requireValue(Keys.FUEL).asMutable();
4645
}
4746

4847
/**

src/main/java/org/spongepowered/api/block/entity/carrier/furnace/FurnaceBlockEntity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public interface FurnaceBlockEntity extends NameableCarrierBlockEntity {
4242
boolean process();
4343

4444
/**
45-
* Gets the {@link org.spongepowered.api.data.value.BoundedValue.Mutable} for the already passed burn time.
45+
* Gets the {@link org.spongepowered.api.data.value.BoundedValue.Mutable} for the remaining fuel.
4646
*
47-
* @return The value for the already passed burn time
47+
* @return The value for the remaining fuel
4848
*/
49-
default BoundedValue.Mutable<Integer> passedBurnTime() {
50-
return this.requireValue(Keys.PASSED_BURN_TIME).asMutable();
49+
default BoundedValue.Mutable<Integer> remainingFuel() {
50+
return this.requireValue(Keys.FUEL).asMutable();
5151
}
5252

5353
/**

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

Lines changed: 893 additions & 909 deletions
Large diffs are not rendered by default.

src/main/java/org/spongepowered/api/entity/AreaEffectCloud.java

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import org.spongepowered.api.data.value.ListValue;
3030
import org.spongepowered.api.data.value.Value;
3131
import org.spongepowered.api.effect.particle.ParticleEffect;
32-
import org.spongepowered.api.effect.particle.ParticleType;
3332
import org.spongepowered.api.effect.potion.PotionEffect;
3433
import org.spongepowered.api.util.Color;
3534

@@ -40,76 +39,76 @@
4039
public interface AreaEffectCloud extends Entity {
4140

4241
/**
43-
* {@link Keys#AREA_EFFECT_CLOUD_COLOR}
42+
* {@link Keys#COLOR}
4443
* @return The color of this cloud
4544
*/
4645
default Value.Mutable<Color> color() {
47-
return this.requireValue(Keys.AREA_EFFECT_CLOUD_COLOR).asMutable();
46+
return this.requireValue(Keys.COLOR).asMutable();
4847
}
4948

5049
/**
51-
* {@link Keys#AREA_EFFECT_CLOUD_RADIUS}
50+
* {@link Keys#RADIUS}
5251
* @return The initial radius of this cloud
5352
*/
5453
default BoundedValue.Mutable<Double> radius() {
55-
return this.requireValue(Keys.AREA_EFFECT_CLOUD_RADIUS).asMutable();
54+
return this.requireValue(Keys.RADIUS).asMutable();
5655
}
5756

5857
/**
59-
* {@link Keys#AREA_EFFECT_CLOUD_PARTICLE_EFFECT}
58+
* {@link Keys#PARTICLE_EFFECT}
6059
* @return The particle type
6160
* @see org.spongepowered.api.effect.particle.ParticleTypes
6261
*/
6362
default Value.Mutable<ParticleEffect> particleEffect() {
64-
return this.requireValue(Keys.AREA_EFFECT_CLOUD_PARTICLE_EFFECT).asMutable();
63+
return this.requireValue(Keys.PARTICLE_EFFECT).asMutable();
6564
}
6665

6766
/**
68-
* {@link Keys#AREA_EFFECT_CLOUD_DURATION}
67+
* {@link Keys#DURATION}
6968
* @return The duration of which this cloud will linger
7069
*/
7170
default BoundedValue.Mutable<Integer> duration() {
72-
return this.requireValue(Keys.AREA_EFFECT_CLOUD_DURATION).asMutable();
71+
return this.requireValue(Keys.DURATION).asMutable();
7372
}
7473

7574
/**
76-
* {@link Keys#AREA_EFFECT_CLOUD_WAIT_TIME}
75+
* {@link Keys#WAIT_TIME}
7776
* @return The wait time before applying to an entity
7877
*/
7978
default BoundedValue.Mutable<Integer> waitTime() {
80-
return this.requireValue(Keys.AREA_EFFECT_CLOUD_WAIT_TIME).asMutable();
79+
return this.requireValue(Keys.WAIT_TIME).asMutable();
8180
}
8281

8382
/**
84-
* {@link Keys#AREA_EFFECT_CLOUD_RADIUS_ON_USE}
83+
* {@link Keys#RADIUS_ON_USE}
8584
* @return The radius decrease per use
8685
*/
8786
default BoundedValue.Mutable<Double> radiusOnUse() {
88-
return this.requireValue(Keys.AREA_EFFECT_CLOUD_RADIUS_ON_USE).asMutable();
87+
return this.requireValue(Keys.RADIUS_ON_USE).asMutable();
8988
}
9089

9190
/**
92-
* {@link Keys#AREA_EFFECT_CLOUD_RADIUS_PER_TICK}
91+
* {@link Keys#RADIUS_PER_TICK}
9392
* @return The radius decrease per tick
9493
*/
9594
default BoundedValue.Mutable<Double> radiusPerTick() {
96-
return this.requireValue(Keys.AREA_EFFECT_CLOUD_RADIUS_PER_TICK).asMutable();
95+
return this.requireValue(Keys.RADIUS_PER_TICK).asMutable();
9796
}
9897

9998
/**
100-
* {@link Keys#AREA_EFFECT_CLOUD_DURATION_ON_USE}
99+
* {@link Keys#DURATION_ON_USE}
101100
* @return The duration of the potion effects when an entity gets a potion applied
102101
*/
103102
default BoundedValue.Mutable<Integer> durationOnUse() {
104-
return this.requireValue(Keys.AREA_EFFECT_CLOUD_DURATION_ON_USE).asMutable();
103+
return this.requireValue(Keys.DURATION_ON_USE).asMutable();
105104
}
106105

107106
/**
108-
* {@link Keys#AREA_EFFECT_CLOUD_REAPPLICATION_DELAY}
107+
* {@link Keys#REAPPLICATION_DELAY}
109108
* @return The delay for an entity to have a potion effect applied while standing in this cloud
110109
*/
111110
default BoundedValue.Mutable<Integer> applicationDelay() {
112-
return this.requireValue(Keys.AREA_EFFECT_CLOUD_REAPPLICATION_DELAY).asMutable();
111+
return this.requireValue(Keys.REAPPLICATION_DELAY).asMutable();
113112
}
114113

115114
/**
@@ -121,11 +120,11 @@ default ListValue.Mutable<PotionEffect> effects() {
121120
}
122121

123122
/**
124-
* {@link Keys#AREA_EFFECT_CLOUD_AGE}
123+
* {@link Keys#AGE}
125124
* @return The age of this cloud
126125
*/
127126
default BoundedValue.Mutable<Integer> age() {
128-
return this.requireValue(Keys.AREA_EFFECT_CLOUD_AGE).asMutable();
127+
return this.requireValue(Keys.AGE).asMutable();
129128
}
130129

131130
}

src/main/java/org/spongepowered/api/entity/FallingBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ default Value.Mutable<Double> damagePerBlock() {
5454
* {@link Keys#MAX_FALL_DAMAGE}
5555
* @return The maximum fall damage
5656
*/
57-
default Value.Mutable<Double> maxFallDamage() {
57+
default Value.Mutable<Integer> maxFallDamage() {
5858
return this.requireValue(Keys.MAX_FALL_DAMAGE).asMutable();
5959
}
6060

src/main/java/org/spongepowered/api/entity/explosive/EnderCrystal.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
public interface EnderCrystal extends Explosive {
3737

3838
/**
39-
* {@link Keys#BEAM_TARGET_POSITION}
39+
* {@link Keys#TARGET_POSITION}
4040
* @return The target position of the beam
4141
*/
4242
default Optional<Value.Mutable<Vector3i>> beamTarget() {
43-
return this.getValue(Keys.BEAM_TARGET_POSITION).map(Value::asMutable);
43+
return this.getValue(Keys.TARGET_POSITION).map(Value::asMutable);
4444
}
4545

4646
/**

src/main/java/org/spongepowered/api/entity/explosive/Explosive.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public interface Explosive extends Entity {
3939
* {@link Keys#EXPLOSION_RADIUS}
4040
* @return The explosion radius
4141
*/
42-
default Optional<Value.Mutable<Double>> explosionRadius() {
42+
default Optional<Value.Mutable<Integer>> explosionRadius() {
4343
return this.getValue(Keys.EXPLOSION_RADIUS).map(Value::asMutable);
4444
}
4545

src/main/java/org/spongepowered/api/entity/hanging/LeashKnot.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,9 @@
2424
*/
2525
package org.spongepowered.api.entity.hanging;
2626

27-
import org.spongepowered.api.data.Keys;
28-
import org.spongepowered.api.data.value.Value;
29-
import org.spongepowered.api.entity.Entity;
30-
3127
/**
3228
* Represents a tied end of a leash on a block, like a fence post.
3329
*/
3430
public interface LeashKnot extends Hanging {
3531

36-
/**
37-
* {@link Keys#LEASHED_ENTITY}
38-
* @return The leashed entity
39-
*/
40-
default Value.Immutable<Entity> leashedEntity() {
41-
return this.requireValue(Keys.LEASHED_ENTITY).asImmutable();
42-
}
43-
4432
}

0 commit comments

Comments
 (0)