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


Java EnumFlags類代碼示例

本文整理匯總了Java中net.minecraft.network.play.server.SPacketPlayerPosLook.EnumFlags的典型用法代碼示例。如果您正苦於以下問題:Java EnumFlags類的具體用法?Java EnumFlags怎麽用?Java EnumFlags使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EnumFlags類屬於net.minecraft.network.play.server.SPacketPlayerPosLook包,在下文中一共展示了EnumFlags類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: teleport

import net.minecraft.network.play.server.SPacketPlayerPosLook.EnumFlags; //導入依賴的package包/類
public void teleport(Entity entity, Vec3d target) throws CommandException {
	if(entity == null) {
		throw new CommandException("entity must not be NULL!");
	}

	if(target == null) {
		throw new CommandException("target must not be NULL!");
	}

	// XXX DISABLED FUNCTIONALITY: This doesn't work as expected.
	if(Boolean.FALSE.booleanValue() && entity instanceof EntityPlayerMP) {
		// special case code
		EnumSet<EnumFlags> enumset = EnumSet.noneOf(SPacketPlayerPosLook.EnumFlags.class);
		float f = entity.rotationPitch;
		float f1 = entity.rotationYaw;

		entity.startRiding((Entity)null);
		((EntityPlayerMP)entity).connection.setPlayerLocation(target.xCoord, target.yCoord, target.zCoord, f, f1, enumset);
		entity.velocityChanged = true;
		return;
	}

	entity.setPositionAndUpdate(target.xCoord, target.yCoord, target.zCoord);
	entity.velocityChanged = true;
}
 
開發者ID:tiffit,項目名稱:TaleCraft,代碼行數:26,代碼來源:TargetedTeleportCommand.java

示例2: setPlayerLocation

import net.minecraft.network.play.server.SPacketPlayerPosLook.EnumFlags; //導入依賴的package包/類
@Override
public void setPlayerLocation(double x, double y, double z, float yaw, float pitch, @Nonnull Set<EnumFlags> relativeSet) {
}
 
開發者ID:SleepyTrousers,項目名稱:EnderIO,代碼行數:4,代碼來源:FakeNetHandlerPlayServer.java

示例3: setPlayerLocation

import net.minecraft.network.play.server.SPacketPlayerPosLook.EnumFlags; //導入依賴的package包/類
@Override
public void setPlayerLocation(double x, double y, double z, float yaw, float pitch, Set<EnumFlags> relativeSet) {

}
 
開發者ID:p455w0rd,項目名稱:DankNull,代碼行數:5,代碼來源:NetServerHandlerFake.java


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