當前位置: 首頁>>代碼示例>>Java>>正文


Java EntityBoat.getEntityWorld方法代碼示例

本文整理匯總了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);
}
 
開發者ID:InfinityRaider,項目名稱:Boatifull,代碼行數:10,代碼來源:EntityBoatLink.java

示例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());
}
 
開發者ID:InfinityRaider,項目名稱:Boatifull,代碼行數:13,代碼來源:EntityBoatChest.java

示例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);
}
 
開發者ID:InfinityRaider,項目名稱:Boatifull,代碼行數:9,代碼來源:InteractionHandler.java

示例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);
    }
}
 
開發者ID:InfinityRaider,項目名稱:Boatifull,代碼行數:13,代碼來源:BoatLinker.java

示例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;
}
 
開發者ID:InfinityRaider,項目名稱:Boatifull,代碼行數:14,代碼來源:BoatId.java

示例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;
}
 
開發者ID:InfinityRaider,項目名稱:Boatifull,代碼行數:5,代碼來源:BoatLinker.java

示例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));
    }
}
 
開發者ID:InfinityRaider,項目名稱:Boatifull,代碼行數:6,代碼來源:BoatId.java


注:本文中的net.minecraft.entity.item.EntityBoat.getEntityWorld方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。