mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-09 07:20:04 -04:00
Records: Deprecate getters (use x() instead of getX())
This commit is contained in:
parent
7ffed6a053
commit
ec87b86c3c
@ -14,14 +14,17 @@
|
||||
package de.bixilon.minosoft.data;
|
||||
|
||||
public record Vector(int x, int y, int z) {
|
||||
@Deprecated
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getZ() {
|
||||
return z;
|
||||
}
|
||||
|
@ -21,14 +21,17 @@ public record Location(double x, double y, double z) {
|
||||
return new Location(position.x(), position.y(), position.z());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public double getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public double getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public double getZ() {
|
||||
return z;
|
||||
}
|
||||
|
@ -14,14 +14,17 @@
|
||||
package de.bixilon.minosoft.data.entities;
|
||||
|
||||
public record RelativeLocation(double x, double y, double z) {
|
||||
@Deprecated
|
||||
public double getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public double getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public double getZ() {
|
||||
return z;
|
||||
}
|
||||
|
@ -16,14 +16,17 @@ package de.bixilon.minosoft.data.entities;
|
||||
import de.bixilon.minosoft.data.mappings.MobEffect;
|
||||
|
||||
public record StatusEffect(MobEffect effect, int amplifier, int duration) {
|
||||
@Deprecated
|
||||
public int getAmplifier() {
|
||||
return amplifier;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public MobEffect getEffect() {
|
||||
return effect;
|
||||
}
|
||||
|
@ -14,14 +14,17 @@
|
||||
package de.bixilon.minosoft.data.entities;
|
||||
|
||||
public record Velocity(short x, short y, short z) {
|
||||
@Deprecated
|
||||
public short getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public short getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public short getZ() {
|
||||
return z;
|
||||
}
|
||||
|
@ -21,14 +21,17 @@ public record VillagerData(VillagerTypes type, VillagerProfessions profession, V
|
||||
this(VillagerTypes.byId(type), VillagerProfessions.byId(profession, versionId), VillagerLevels.byId(level));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public VillagerTypes getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public VillagerProfessions getProfession() {
|
||||
return profession;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public VillagerLevels getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import de.bixilon.minosoft.data.inventory.Slot;
|
||||
|
||||
public record Ingredient(Slot[] slot) {
|
||||
|
||||
@Deprecated
|
||||
public Slot[] getSlot() {
|
||||
return slot;
|
||||
}
|
||||
|
@ -18,14 +18,17 @@ public record BlockPosition(int x, int y, int z) {
|
||||
return new ChunkLocation(x / 16, z / 16);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getZ() {
|
||||
return z;
|
||||
}
|
||||
|
@ -17,10 +17,12 @@ package de.bixilon.minosoft.data.world;
|
||||
* Chunk X and Z location (block position / 16, rounded down)
|
||||
*/
|
||||
public record ChunkLocation(int x, int z) {
|
||||
@Deprecated
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getZ() {
|
||||
return z;
|
||||
}
|
||||
|
@ -23,14 +23,17 @@ public record InChunkLocation(int x, int y, int z) {
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getZ() {
|
||||
return z;
|
||||
}
|
||||
|
@ -17,14 +17,17 @@ package de.bixilon.minosoft.data.world;
|
||||
* Chunk X, Y and Z location (max 16x16x16)
|
||||
*/
|
||||
public record InChunkSectionLocation(int x, int y, int z) {
|
||||
@Deprecated
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public int getZ() {
|
||||
return z;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user