use of net.minecraft.entity.projectile.FishingBobberEntity in project Magma-1.16.x by magmafoundation.
the class CraftFishHook method setMinWaitTime.
@Override
public void setMinWaitTime(int minWaitTime) {
FishingBobberEntity hook = getHandle();
Validate.isTrue(minWaitTime >= 0 && minWaitTime <= this.getMaxWaitTime(), "The minimum wait time should be between 0 and the maximum wait time.");
hook.minWaitTime = minWaitTime;
}
use of net.minecraft.entity.projectile.FishingBobberEntity in project Magma-1.16.x by magmafoundation.
the class CraftFishHook method pullHookedEntity.
@Override
public boolean pullHookedEntity() {
FishingBobberEntity hook = getHandle();
if (hook.hookedIn == null) {
return false;
}
hook.bringInHookedEntity();
return true;
}
use of net.minecraft.entity.projectile.FishingBobberEntity in project Magma-1.16.x by magmafoundation.
the class CraftFishHook method setHookedEntity.
@Override
public void setHookedEntity(Entity entity) {
FishingBobberEntity hook = getHandle();
hook.hookedIn = (entity != null) ? ((CraftEntity) entity).getHandle() : null;
hook.getEntityData().set(FishingBobberEntity.DATA_HOOKED_ENTITY, hook.hookedIn != null ? hook.hookedIn.getId() + 1 : 0);
}
use of net.minecraft.entity.projectile.FishingBobberEntity in project LoliServer by Loli-Server.
the class CraftFishHook method setHookedEntity.
@Override
public void setHookedEntity(Entity entity) {
FishingBobberEntity hook = getHandle();
hook.hookedIn = (entity != null) ? ((CraftEntity) entity).getHandle() : null;
hook.getEntityData().set(FishingBobberEntity.DATA_HOOKED_ENTITY, hook.hookedIn != null ? hook.hookedIn.getId() + 1 : 0);
}
Aggregations