本文整理匯總了Java中net.minecraft.entity.item.EntityBoat.getEntityWorld方法的典型用法代碼示例。如果您正苦於以下問題:Java EntityBoat.getEntityWorld方法的具體用法?Java EntityBoat.getEntityWorld怎麽用?Java EntityBoat.getEntityWorld使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.entity.item.EntityBoat
的用法示例。
在下文中一共展示了EntityBoat.getEntityWorld方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: EntityBoatLink
import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
public EntityBoatLink(EntityBoat leader, EntityBoat follower, ItemStack linkItem) {
this(leader.getEntityWorld());
this.ownerId = CapabilityBoatId.getBoatId(follower);
this.owner = follower;
this.leaderId = CapabilityBoatId.getBoatId(leader);
this.leader = leader;
this.linkItem = linkItem.copy();
this.copyLocationAndAnglesFrom(follower);
}
示例2: EntityBoatChest
import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
public EntityBoatChest(EntityBoat boat) {
this(boat.getEntityWorld(), boat.prevPosX, boat.prevPosY, boat.prevPosZ);
this.posX = boat.posX;
this.posY = boat.posY;
this.posZ = boat.posZ;
this.motionX = boat.motionX;
this.motionY = boat.motionY;
this.motionZ = boat.motionZ;
this.rotationPitch = boat.rotationPitch;
this.rotationYaw = boat.rotationYaw;
this.setBoatType(boat.getBoatType());
}
示例3: createChestBoat
import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
private void createChestBoat(EntityPlayer player, EntityBoat boat, ItemStack stack) {
World world = boat.getEntityWorld();
EntityBoatChest chestBoat = new EntityBoatChest(boat);
boat.setDead();
new MessageSetEntityDead(boat).sendToAll();
world.spawnEntity(chestBoat);
this.reduceStackSize(player, stack);
}
示例4: unlinkBoat
import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
@Override
public void unlinkBoat(EntityBoat follower) {
if(boatLinks.containsKey(follower)) {
IBoatLink link = getBoatLink(follower);
boatLinks.remove(follower);
link.breakLink();
EntityItem item = new EntityItem(follower.getEntityWorld(), follower.posX, follower.posY, follower.posZ, link.getLinkItem());
follower.getEntityWorld().spawnEntity(item);
} else {
boatLinks.remove(follower);
}
}
示例5: setBoat
import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
@Override
public IBoatId setBoat(EntityBoat boat) {
if(this.owner == null) {
this.owner = boat;
if (!boat.getEntityWorld().isRemote) {
this.id = getNextId();
BOATS.put(this.getId(), this.getBoat());
} else {
new MessageRequestBoatSync(this.owner).sendToServer();
}
}
return this;
}
示例6: areBoatsCloseEnough
import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
@Override
public boolean areBoatsCloseEnough(EntityBoat a, EntityBoat b) {
return a != b && a.getEntityWorld() == b.getEntityWorld() && a.getDistanceSqToEntity(b) <= LINK_RANGE * LINK_RANGE;
}
示例7: onBoatRemoved
import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
public static void onBoatRemoved(EntityBoat boat) {
if(boat != null && !boat.getEntityWorld().isRemote) {
FREE_IDS.add(CapabilityBoatId.getBoatId(boat));
}
}