本文整理汇总了Java中net.minecraft.server.EntityFishingHook类的典型用法代码示例。如果您正苦于以下问题:Java EntityFishingHook类的具体用法?Java EntityFishingHook怎么用?Java EntityFishingHook使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EntityFishingHook类属于net.minecraft.server包,在下文中一共展示了EntityFishingHook类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBiteChance
import net.minecraft.server.EntityFishingHook; //导入依赖的package包/类
public double getBiteChance() {
EntityFishingHook hook = getHandle();
if (this.biteChance == -1) {
if (hook.world.isRainingAt(MathHelper.floor(hook.locX), MathHelper.floor(hook.locY) + 1, MathHelper.floor(hook.locZ))) {
return 1/300.0;
}
return 1/500.0;
}
return this.biteChance;
}
示例2: getBiteChance
import net.minecraft.server.EntityFishingHook; //导入依赖的package包/类
public double getBiteChance() {
EntityFishingHook hook = getHandle();
if (this.biteChance == -1) {
if (hook.world.isRainingAt(new BlockPosition(MathHelper.floor(hook.locX), MathHelper.floor(hook.locY) + 1, MathHelper.floor(hook.locZ)))) {
return 1/300.0;
}
return 1/500.0;
}
return this.biteChance;
}
示例3: getBiteChance
import net.minecraft.server.EntityFishingHook; //导入依赖的package包/类
public double getBiteChance() {
EntityFishingHook hook = getHandle();
if (this.biteChance == -1) {
if (hook.world.F(MathHelper.floor(hook.locX), MathHelper.floor(hook.locY) + 1, MathHelper.floor(hook.locZ))) {
return 1/300.0;
}
return 1/500.0;
}
return this.biteChance;
}
示例4: CraftFish
import net.minecraft.server.EntityFishingHook; //导入依赖的package包/类
public CraftFish(CraftServer server, EntityFishingHook entity) {
super(server, entity);
}
示例5: getHandle
import net.minecraft.server.EntityFishingHook; //导入依赖的package包/类
@Override
public EntityFishingHook getHandle() {
return (EntityFishingHook) entity;
}