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


Java ChunkCoordinates.set方法代碼示例

本文整理匯總了Java中net.minecraft.util.ChunkCoordinates.set方法的典型用法代碼示例。如果您正苦於以下問題:Java ChunkCoordinates.set方法的具體用法?Java ChunkCoordinates.set怎麽用?Java ChunkCoordinates.set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.util.ChunkCoordinates的用法示例。


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

示例1: getTrunkBlockPosBySide

import net.minecraft.util.ChunkCoordinates; //導入方法依賴的package包/類
public ChunkCoordinates getTrunkBlockPosBySide(World world, int x, int y, int z, int side) {
	ChunkCoordinates ret = new ChunkCoordinates(x, y, z);
	
	switch (side) {
	case 5:
		ret.set(x - 1, y, z);
		return ret;
	case 4:
		ret.set(x + 1, y, z);
		return ret;
	case 2:
		ret.set(x, y, z + 1);
		return ret;
	case 3:
		ret.set(x, y, z - 1);
		return ret;
	}
	
	return null;
}
 
開發者ID:Shurgent,項目名稱:TFCTech,代碼行數:21,代碼來源:BlockLatexExtractor.java

示例2: getTrunkBlockPosByRotation

import net.minecraft.util.ChunkCoordinates; //導入方法依賴的package包/類
public ChunkCoordinates getTrunkBlockPosByRotation(World world, int x, int y, int z, int rotation) {
	ChunkCoordinates ret = new ChunkCoordinates(x, y, z);
	
	switch (rotation) {
	case 1:
		ret.set(x - 1, y, z);
		return ret;
	case 3:
		ret.set(x + 1, y, z);
		return ret;
	case 0:
		ret.set(x, y, z + 1);
		return ret;
	case 2:
		ret.set(x, y, z - 1);
		return ret;
	}
	
	return null;
}
 
開發者ID:Shurgent,項目名稱:TFCTech,代碼行數:21,代碼來源:BlockLatexExtractor.java

示例3: handle

import net.minecraft.util.ChunkCoordinates; //導入方法依賴的package包/類
@Override
public void handle(ByteBuf in, EntityPlayer player) {
	int dimension = in.readInt();
	int posX = in.readInt();
	int posY = in.readInt();
	int posZ = in.readInt();
	int skylightSubtracted = in.readInt();
	float thunderingStrength = in.readFloat();
	float rainingStrength = in.readFloat();
	long worldTime = in.readLong();

	WorldClient proxyworld = ProxyWorldManager.getProxyworld(dimension);

	if (proxyworld == null) return;
	if (proxyworld.provider.dimensionId != dimension) return;

	ChunkCoordinates cc = new ChunkCoordinates();
	cc.set(posX, posY, posZ);
	Collection<WorldView> views = ProxyWorldManager.getWorldViews(dimension);
	for (WorldView view : views) {
		view.updateWorldSpawn(cc);
	}
	proxyworld.setSpawnLocation(posX, posY, posZ);
	proxyworld.skylightSubtracted = skylightSubtracted;
	proxyworld.thunderingStrength = thunderingStrength;
	proxyworld.setRainStrength(rainingStrength);
	proxyworld.setWorldTime(worldTime);
}
 
開發者ID:XCompWiz,項目名稱:LookingGlass,代碼行數:29,代碼來源:PacketWorldInfo.java


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