本文整理匯總了Java中net.minecraft.entity.Entity.isRidingOrBeingRiddenBy方法的典型用法代碼示例。如果您正苦於以下問題:Java Entity.isRidingOrBeingRiddenBy方法的具體用法?Java Entity.isRidingOrBeingRiddenBy怎麽用?Java Entity.isRidingOrBeingRiddenBy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.entity.Entity
的用法示例。
在下文中一共展示了Entity.isRidingOrBeingRiddenBy方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: handleSetPassengers
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public void handleSetPassengers(SPacketSetPassengers packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityId());
if (entity == null)
{
LOGGER.warn("Received passengers for unknown entity");
}
else
{
boolean flag = entity.isRidingOrBeingRiddenBy(this.gameController.player);
entity.removePassengers();
for (int i : packetIn.getPassengerIds())
{
Entity entity1 = this.clientWorldController.getEntityByID(i);
if (entity1 != null)
{
entity1.startRiding(entity, true);
if (entity1 == this.gameController.player && !flag)
{
this.gameController.ingameGUI.setRecordPlaying(I18n.format("mount.onboard", new Object[] {GameSettings.getKeyDisplayString(this.gameController.gameSettings.keyBindSneak.getKeyCode())}), false);
}
}
}
}
}
示例2: isOutlineActive
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
private boolean isOutlineActive(Entity p_184383_1_, Entity p_184383_2_, ICamera p_184383_3_)
{
if(Hacks.findMod(OutlineESP.class).isEnabled())
return true;
boolean flag = p_184383_2_ instanceof EntityLivingBase && ((EntityLivingBase)p_184383_2_).isPlayerSleeping();
return p_184383_1_ == p_184383_2_ && this.mc.gameSettings.thirdPersonView == 0 && !flag ? false : (p_184383_1_.isGlowing() ? true : (this.mc.player.isSpectator() && this.mc.gameSettings.keyBindSpectatorOutlines.isKeyDown() && p_184383_1_ instanceof EntityPlayer ? p_184383_1_.ignoreFrustumCheck || p_184383_3_.isBoundingBoxInFrustum(p_184383_1_.getEntityBoundingBox()) || p_184383_1_.isRidingOrBeingRiddenBy(this.mc.player) : false));
}
示例3: handleSetPassengers
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public void handleSetPassengers(SPacketSetPassengers packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityId());
if (entity == null)
{
LOGGER.warn("Received passengers for unknown entity");
}
else
{
boolean flag = entity.isRidingOrBeingRiddenBy(this.gameController.thePlayer);
entity.removePassengers();
for (int i : packetIn.getPassengerIds())
{
Entity entity1 = this.clientWorldController.getEntityByID(i);
if (entity1 == null)
{
LOGGER.warn("Received unknown passenger for {}", new Object[] {entity});
}
else
{
entity1.startRiding(entity, true);
if (entity1 == this.gameController.thePlayer && !flag)
{
this.gameController.ingameGUI.setRecordPlaying(I18n.format("mount.onboard", new Object[] {this.gameController.gameSettings.keyBindSneak.getDisplayName()}), false);
}
}
}
}
}
示例4: isOutlineActive
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
private boolean isOutlineActive(Entity p_184383_1_, Entity p_184383_2_, ICamera p_184383_3_)
{
boolean flag = p_184383_2_ instanceof EntityLivingBase && ((EntityLivingBase)p_184383_2_).isPlayerSleeping();
return p_184383_1_ == p_184383_2_ && this.mc.gameSettings.thirdPersonView == 0 && !flag ? false : (p_184383_1_.isGlowing() ? true : (this.mc.thePlayer.isSpectator() && this.mc.gameSettings.keyBindSpectatorOutlines.isKeyDown() && p_184383_1_ instanceof EntityPlayer ? p_184383_1_.ignoreFrustumCheck || p_184383_3_.isBoundingBoxInFrustum(p_184383_1_.getEntityBoundingBox()) || p_184383_1_.isRidingOrBeingRiddenBy(this.mc.thePlayer) : false));
}