mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-08 09:27:58 +01:00
Format FishingHookMeta + make owner not null
This commit is contained in:
parent
b1cfa3d9b2
commit
7a6fb4d601
@ -27,14 +27,15 @@ public class FishingHookMeta extends EntityMeta implements ObjectDataProvider {
|
|||||||
int entityID = value == null ? 0 : value.getEntityId() + 1;
|
int entityID = value == null ? 0 : value.getEntityId() + 1;
|
||||||
super.metadata.setIndex((byte) 7, Metadata.VarInt(entityID));
|
super.metadata.setIndex((byte) 7, Metadata.VarInt(entityID));
|
||||||
}
|
}
|
||||||
@Nullable
|
|
||||||
public Entity getOwnerEntity() {
|
@NotNull
|
||||||
return owner;
|
public Entity getOwnerEntity() {
|
||||||
}
|
return owner;
|
||||||
|
}
|
||||||
|
|
||||||
public void setOwnerEntity(@Nullable Entity value) {
|
public void setOwnerEntity(@NotNull Entity value) {
|
||||||
this.owner = value;
|
this.owner = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCatchable() {
|
public boolean isCatchable() {
|
||||||
return super.metadata.getIndex((byte) 8, false);
|
return super.metadata.getIndex((byte) 8, false);
|
||||||
@ -44,13 +45,13 @@ public class FishingHookMeta extends EntityMeta implements ObjectDataProvider {
|
|||||||
super.metadata.setIndex((byte) 8, Metadata.Boolean(value));
|
super.metadata.setIndex((byte) 8, Metadata.Boolean(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getObjectData() {
|
public int getObjectData() {
|
||||||
return owner.getEntityId();
|
return owner.getEntityId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean requiresVelocityPacketAtSpawn() {
|
public boolean requiresVelocityPacketAtSpawn() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user