更新版本 v1.2.0 -> v1.2.1
修复API方法
This commit is contained in:
parent
47ec1af5c1
commit
0e846b98a0
|
|
@ -59,7 +59,7 @@ mod_name=Super Lead Rope
|
||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=GPLv3
|
mod_license=GPLv3
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=1.2.0
|
mod_version=1.2.1
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||||
# This should match the base package used for the mod sources.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ public interface ILeashHelper {
|
||||||
if (SuperLeadRopeApi.isLeashable(target)) {
|
if (SuperLeadRopeApi.isLeashable(target)) {
|
||||||
if (!isHoldingLeash(target)) {
|
if (!isHoldingLeash(target)) {
|
||||||
return false;
|
return false;
|
||||||
} else return unleashEntity(getHolderEntity().getUUID());
|
} else return unleashEntity(target.getUUID());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ public class LeashHelper implements ILeashHelper {
|
||||||
Entity entity = CommonEventHandler.Game.getServerLevel().getEntity(uuid);
|
Entity entity = CommonEventHandler.Game.getServerLevel().getEntity(uuid);
|
||||||
|
|
||||||
if (entity != null && SuperLeadRopeApi.isLeashable(entity)) {
|
if (entity != null && SuperLeadRopeApi.isLeashable(entity)) {
|
||||||
return LeashDataInnerAPI.getLeashData(entity).map(i-> i.addLeash(entity)).orElse(false);
|
return LeashDataInnerAPI.getLeashData(entity).map(i-> i.addLeash(getHolderEntity())).orElse(false);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -76,7 +76,7 @@ public class LeashHelper implements ILeashHelper {
|
||||||
public boolean unleashEntity(UUID uuid) {
|
public boolean unleashEntity(UUID uuid) {
|
||||||
Entity entity = CommonEventHandler.Game.getServerLevel().getEntity(uuid);
|
Entity entity = CommonEventHandler.Game.getServerLevel().getEntity(uuid);
|
||||||
if (entity != null && SuperLeadRopeApi.isLeashable(entity)) {
|
if (entity != null && SuperLeadRopeApi.isLeashable(entity)) {
|
||||||
return LeashDataInnerAPI.getLeashData(entity).map(i-> i.removeLeash(entity)).orElse(false);
|
return LeashDataInnerAPI.getLeashData(entity).map(i-> i.removeLeash(getHolderEntity())).orElse(false);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user