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


Java TileEntity.validate方法代碼示例

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


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

示例1: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if(active)
		world.setBlock(x, y, z, TechnicalBlock.WasherActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.WasherIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:Washer.java

示例2: setState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void setState(boolean active, World worldIn, BlockPos pos) {
    IBlockState iblockstate = worldIn.getBlockState(pos);
    TileEntity tileentity = worldIn.getTileEntity(pos);
    keepInventory = true;

    if (active) {
        worldIn.setBlockState(pos, CraftingBlocks.craftiniumForgeLit.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
        worldIn.setBlockState(pos, CraftingBlocks.craftiniumForgeLit.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
    } else {
        worldIn.setBlockState(pos, CraftingBlocks.craftiniumForge.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
        worldIn.setBlockState(pos, CraftingBlocks.craftiniumForge.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
    }

    keepInventory = false;

    if (tileentity != null) {
        tileentity.validate();
        worldIn.setTileEntity(pos, tileentity);
    }
}
 
開發者ID:Randores,項目名稱:Randores2,代碼行數:21,代碼來源:CraftiniumForge.java

示例3: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if(active)
		world.setBlock(x, y, z, TechnicalBlock.CentrifugeAdvancedActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.CentrifugeAdvancedIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:CentrifugeAdvanced.java

示例4: setState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void setState(boolean active, World worldIn, BlockPos pos)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);
    TileEntity tileentity = worldIn.getTileEntity(pos);
    keepInventory = true;

    if (active)
    {
        worldIn.setBlockState(pos, Blocks.lit_furnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
        worldIn.setBlockState(pos, Blocks.lit_furnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
    }
    else
    {
        worldIn.setBlockState(pos, Blocks.furnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
        worldIn.setBlockState(pos, Blocks.furnace.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
    }

    keepInventory = false;

    if (tileentity != null)
    {
        tileentity.validate();
        worldIn.setTileEntity(pos, tileentity);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:26,代碼來源:BlockFurnace.java

示例5: addTileEntity

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public void addTileEntity(BlockPos pos, TileEntity tileEntityIn)
{
    tileEntityIn.setWorldObj(this.worldObj);
    tileEntityIn.setPos(pos);

    if (this.getBlock(pos) instanceof ITileEntityProvider)
    {
        if (this.chunkTileEntityMap.containsKey(pos))
        {
            ((TileEntity)this.chunkTileEntityMap.get(pos)).invalidate();
        }

        tileEntityIn.validate();
        this.chunkTileEntityMap.put(pos, tileEntityIn);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:17,代碼來源:Chunk.java

示例6: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean lit, World world, BlockPos pos)
{
    TileEntity tileEntity = world.getTileEntity(pos);
    isAlteringLit = true;

    if (lit)
    {
        world.setBlockState(pos, RegisterBlocks.campfireLit.getDefaultState(), 3);
    }
    else
    {
        world.setBlockState(pos, RegisterBlocks.campfire.getDefaultState(), 3);
    }

    isAlteringLit = false;

    if (tileEntity != null)
    {
        tileEntity.validate();
        world.setTileEntity(pos, tileEntity);
    }
}
 
開發者ID:einsteinsci,項目名稱:BetterBeginningsReborn,代碼行數:23,代碼來源:BlockCampfire.java

示例7: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if (active)
		world.setBlock(x, y, z, TechnicalBlock.BlastFurnaceBasicActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.BlastFurnaceBasicIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:BlastFurnaceBasic.java

示例8: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if(active)
		world.setBlock(x, y, z, TechnicalBlock.GrinderMediumActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.GrinderMediumIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:GrinderMedium.java

示例9: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if(active)
		world.setBlock(x, y, z, TechnicalBlock.CentrifugeActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.CentrifugeIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if(tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:Centrifuge.java

示例10: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if (active)
		world.setBlock(x, y, z, TechnicalBlock.BlastFurnaceAdvancedActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.BlastFurnaceAdvancedIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:BlastFurnaceAdvanced.java

示例11: setState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void setState(boolean active, World worldIn, BlockPos pos)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);
    TileEntity tileentity = worldIn.getTileEntity(pos);
    keepInventory = true;

    if (active)
    {
        worldIn.setBlockState(pos, Blocks.LIT_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
        worldIn.setBlockState(pos, Blocks.LIT_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
    }
    else
    {
        worldIn.setBlockState(pos, Blocks.FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
        worldIn.setBlockState(pos, Blocks.FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
    }

    keepInventory = false;

    if (tileentity != null)
    {
        tileentity.validate();
        worldIn.setTileEntity(pos, tileentity);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:26,代碼來源:BlockFurnace.java

示例12: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean lit, World world, BlockPos pos)
{
    IBlockState state = world.getBlockState(pos);
    TileEntity tileEntity = world.getTileEntity(pos);

    if (lit)
    {
        world.setBlockState(pos, RegisterBlocks.obsidianKilnLit.getDefaultState()
                .withProperty(FACING, state.getValue(FACING)), 3);
    }
    else
    {
        world.setBlockState(pos, RegisterBlocks.obsidianKiln.getDefaultState()
                .withProperty(FACING, state.getValue(FACING)), 3);
    }

    if (tileEntity != null)
    {
        tileEntity.validate();
        world.setTileEntity(pos, tileEntity);
    }
}
 
開發者ID:einsteinsci,項目名稱:BetterBeginningsReborn,代碼行數:23,代碼來源:BlockObsidianKiln.java

示例13: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean active, World world, int x, int y, int z) {
	int direction = world.getBlockMetadata(x, y, z);
	TileEntity tileEntity = world.getTileEntity(x, y, z);
	isBurning = true;

	if (active)
		world.setBlock(x, y, z, TechnicalBlock.ElectricFurnaceAdvancedActive);
	else
		world.setBlock(x, y, z, TechnicalBlock.ElectricFurnaceAdvancedIdle);

	isBurning = false;
	world.setBlockMetadataWithNotify(x, y, z, direction, 2);

	if (tileEntity != null) {
		tileEntity.validate();
		world.setTileEntity(x, y, z, tileEntity);
	}
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:19,代碼來源:ElectricFurnaceAdvanced.java

示例14: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean lit, World world, BlockPos pos)
{
    IBlockState state = world.getBlockState(pos);
    TileEntity tileEntity = world.getTileEntity(pos);

    if (lit)
    {
        world.setBlockState(pos, RegisterBlocks.netherBrickOvenLit.getDefaultState()
                .withProperty(FACING, state.getValue(FACING)), 3);
    }
    else
    {
        world.setBlockState(pos, RegisterBlocks.netherBrickOven.getDefaultState()
                .withProperty(FACING, state.getValue(FACING)), 3);
    }

    if (tileEntity != null)
    {
        tileEntity.validate();
        world.setTileEntity(pos, tileEntity);
    }
}
 
開發者ID:einsteinsci,項目名稱:BetterBeginningsReborn,代碼行數:23,代碼來源:BlockNetherBrickOven.java

示例15: updateBlockState

import net.minecraft.tileentity.TileEntity; //導入方法依賴的package包/類
public static void updateBlockState(boolean flag, World world, BlockPos pos)
{
    IBlockState iblockstate = world.getBlockState(pos);
    TileEntity tileentity = world.getTileEntity(pos);

    if (flag)
    {
        world.setBlockState(pos, RegisterBlocks.kilnLit.getDefaultState()
                .withProperty(FACING, iblockstate.getValue(FACING)), 3);
    }
    else
    {
        world.setBlockState(pos, RegisterBlocks.kiln.getDefaultState()
                .withProperty(FACING, iblockstate.getValue(FACING)), 3);
    }

    if (tileentity != null)
    {
        tileentity.validate();
        world.setTileEntity(pos, tileentity);
    }
}
 
開發者ID:einsteinsci,項目名稱:BetterBeginningsReborn,代碼行數:23,代碼來源:BlockKiln.java


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