• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TileEntityFlowerPot类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.tileentity.TileEntityFlowerPot的典型用法代码示例。如果您正苦于以下问题:Java TileEntityFlowerPot类的具体用法?Java TileEntityFlowerPot怎么用?Java TileEntityFlowerPot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TileEntityFlowerPot类属于net.minecraft.tileentity包,在下文中一共展示了TileEntityFlowerPot类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: colorMultiplier

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
public int colorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass)
{
    TileEntity tileentity = worldIn.getTileEntity(pos);

    if (tileentity instanceof TileEntityFlowerPot)
    {
        Item item = ((TileEntityFlowerPot)tileentity).getFlowerPotItem();

        if (item instanceof ItemBlock)
        {
            return Block.getBlockFromItem(item).colorMultiplier(worldIn, pos, renderPass);
        }
    }

    return 16777215;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:17,代码来源:BlockFlowerPot.java


示例2: handleUpdateTileEntity

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
/**
 * Updates the NBTTagCompound metadata of instances of the following entitytypes: Mob spawners, command blocks,
 * beacons, skulls, flowerpot
 */
public void handleUpdateTileEntity(S35PacketUpdateTileEntity packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (this.gameController.theWorld.isBlockLoaded(packetIn.getPos()))
    {
        TileEntity tileentity = this.gameController.theWorld.getTileEntity(packetIn.getPos());
        int i = packetIn.getTileEntityType();

        if (i == 1 && tileentity instanceof TileEntityMobSpawner || i == 2 && tileentity instanceof TileEntityCommandBlock || i == 3 && tileentity instanceof TileEntityBeacon || i == 4 && tileentity instanceof TileEntitySkull || i == 5 && tileentity instanceof TileEntityFlowerPot || i == 6 && tileentity instanceof TileEntityBanner)
        {
            tileentity.readFromNBT(packetIn.getNbtCompound());
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:20,代码来源:NetHandlerPlayClient.java


示例3: handleUpdateTileEntity

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
/**
 * Updates the NBTTagCompound metadata of instances of the following
 * entitytypes: Mob spawners, command blocks, beacons, skulls, flowerpot
 */
public void handleUpdateTileEntity(S35PacketUpdateTileEntity packetIn) {
	PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

	if (this.gameController.theWorld.isBlockLoaded(packetIn.getPos())) {
		TileEntity tileentity = this.gameController.theWorld.getTileEntity(packetIn.getPos());
		int i = packetIn.getTileEntityType();

		if (i == 1 && tileentity instanceof TileEntityMobSpawner
				|| i == 2 && tileentity instanceof TileEntityCommandBlock
				|| i == 3 && tileentity instanceof TileEntityBeacon
				|| i == 4 && tileentity instanceof TileEntitySkull
				|| i == 5 && tileentity instanceof TileEntityFlowerPot
				|| i == 6 && tileentity instanceof TileEntityBanner) {
			tileentity.readFromNBT(packetIn.getNbtCompound());
		}
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:22,代码来源:NetHandlerPlayClient.java


示例4: handleUpdateTileEntity

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
/**
 * Updates the NBTTagCompound metadata of instances of the following entitytypes: Mob spawners, command blocks,
 * beacons, skulls, flowerpot
 */
public void handleUpdateTileEntity(SPacketUpdateTileEntity packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (this.gameController.world.isBlockLoaded(packetIn.getPos()))
    {
        TileEntity tileentity = this.gameController.world.getTileEntity(packetIn.getPos());
        int i = packetIn.getTileEntityType();
        boolean flag = i == 2 && tileentity instanceof TileEntityCommandBlock;

        if (i == 1 && tileentity instanceof TileEntityMobSpawner || flag || i == 3 && tileentity instanceof TileEntityBeacon || i == 4 && tileentity instanceof TileEntitySkull || i == 5 && tileentity instanceof TileEntityFlowerPot || i == 6 && tileentity instanceof TileEntityBanner || i == 7 && tileentity instanceof TileEntityStructure || i == 8 && tileentity instanceof TileEntityEndGateway || i == 9 && tileentity instanceof TileEntitySign || i == 10 && tileentity instanceof TileEntityShulkerBox)
        {
            tileentity.readFromNBT(packetIn.getNbtCompound());
        }

        if (flag && this.gameController.currentScreen instanceof GuiCommandBlock)
        {
            ((GuiCommandBlock)this.gameController.currentScreen).updateGui();
        }
    }
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:26,代码来源:NetHandlerPlayClient.java


示例5: getItem

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
{
    TileEntityFlowerPot tileentityflowerpot = this.getTileEntity(worldIn, pos);

    if (tileentityflowerpot != null)
    {
        ItemStack itemstack = tileentityflowerpot.getFlowerItemStack();

        if (!itemstack.func_190926_b())
        {
            return itemstack;
        }
    }

    return new ItemStack(Items.FLOWER_POT);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:17,代码来源:BlockFlowerPot.java


示例6: getItem

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
{
    TileEntityFlowerPot tileentityflowerpot = this.getTileEntity(worldIn, pos);

    if (tileentityflowerpot != null)
    {
        ItemStack itemstack = tileentityflowerpot.getFlowerItemStack();

        if (itemstack != null)
        {
            return itemstack;
        }
    }

    return new ItemStack(Items.FLOWER_POT);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:17,代码来源:BlockFlowerPot.java


示例7: onReceiveClient

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
@Override
public void onReceiveClient(Minecraft client, WorldClient world, EntityPlayerSP player, MessageContext context) {
    BlockSystem blockSystem = BlockSystems.PROXY.getBlockSystemHandler(world).getBlockSystem(this.blockSystem);
    if (blockSystem != null) {
        if (blockSystem.isBlockLoaded(this.pos)) {
            TileEntity blockEntity = blockSystem.getTileEntity(this.pos);
            boolean commandBlock = this.type == 2 && blockEntity instanceof TileEntityCommandBlock;
            if (this.type == 1 && blockEntity instanceof TileEntityMobSpawner || commandBlock || this.type == 3 && blockEntity instanceof TileEntityBeacon || this.type == 4 && blockEntity instanceof TileEntitySkull || this.type == 5 && blockEntity instanceof TileEntityFlowerPot || this.type == 6 && blockEntity instanceof TileEntityBanner || this.type == 7 && blockEntity instanceof TileEntityStructure || this.type == 8 && blockEntity instanceof TileEntityEndGateway || this.type == 9 && blockEntity instanceof TileEntitySign) {
                blockEntity.readFromNBT(this.data);
            } else {
                blockEntity.onDataPacket(client.getConnection().getNetworkManager(), new SPacketUpdateTileEntity(this.pos, this.type, this.data));
            }
            if (commandBlock && client.currentScreen instanceof GuiCommandBlock) {
                ((GuiCommandBlock) client.currentScreen).updateGui();
            }
        }
    }
}
 
开发者ID:gegy1000,项目名称:BlockSystems,代码行数:19,代码来源:UpdateBlockEntityMessage.java


示例8: colorMultiplier

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public int colorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass)
{
	TileEntity tileentity = worldIn.getTileEntity(pos);

	if (tileentity instanceof TileEntityFlowerPot)
	{
		Item item = ((TileEntityFlowerPot) tileentity).getFlowerPotItem();

		if (item instanceof ItemBlock)
		{
			return Block.getBlockFromItem(item).colorMultiplier(worldIn, pos, renderPass);
		}
	}

	return 16777215;
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:19,代码来源:MBlockSketchyBackwaterFlowerpot.java


示例9: handleUpdateTileEntity

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
/**
 * Updates the NBTTagCompound metadata of instances of the following entitytypes: Mob spawners, command blocks,
 * beacons, skulls, flowerpot
 */
public void handleUpdateTileEntity(SPacketUpdateTileEntity packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (this.gameController.theWorld.isBlockLoaded(packetIn.getPos()))
    {
        TileEntity tileentity = this.gameController.theWorld.getTileEntity(packetIn.getPos());
        int i = packetIn.getTileEntityType();
        boolean flag = i == 2 && tileentity instanceof TileEntityCommandBlock;

        if (i == 1 && tileentity instanceof TileEntityMobSpawner || flag || i == 3 && tileentity instanceof TileEntityBeacon || i == 4 && tileentity instanceof TileEntitySkull || i == 5 && tileentity instanceof TileEntityFlowerPot || i == 6 && tileentity instanceof TileEntityBanner || i == 7 && tileentity instanceof TileEntityStructure || i == 8 && tileentity instanceof TileEntityEndGateway || i == 9 && tileentity instanceof TileEntitySign)
        {
            tileentity.readFromNBT(packetIn.getNbtCompound());
        }
        else
        {
            tileentity.onDataPacket(netManager, packetIn);
        }

        if (flag && this.gameController.currentScreen instanceof GuiCommandBlock)
        {
            ((GuiCommandBlock)this.gameController.currentScreen).updateGui();
        }
    }
}
 
开发者ID:BlazeAxtrius,项目名称:ExpandedRailsMod,代码行数:30,代码来源:NetHandlerPlayClient.java


示例10: breakBlock

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
{
    TileEntityFlowerPot tileentityflowerpot = this.getTileEntity(worldIn, pos);

    if (tileentityflowerpot != null && tileentityflowerpot.getFlowerPotItem() != null)
    {
        spawnAsEntity(worldIn, pos, new ItemStack(tileentityflowerpot.getFlowerPotItem(), 1, tileentityflowerpot.getFlowerPotData()));
    }

    super.breakBlock(worldIn, pos, state);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:12,代码来源:BlockFlowerPot.java


示例11: onBlockHarvested

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
{
    super.onBlockHarvested(worldIn, pos, state, player);

    if (player.capabilities.isCreativeMode)
    {
        TileEntityFlowerPot tileentityflowerpot = this.getTileEntity(worldIn, pos);

        if (tileentityflowerpot != null)
        {
            tileentityflowerpot.setFlowerPotData((Item)null, 0);
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:15,代码来源:BlockFlowerPot.java


示例12: breakBlock

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
/**
 * Called serverside after this block is replaced with another in Chunk, but before the Tile Entity is updated
 */
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
{
    TileEntityFlowerPot tileentityflowerpot = this.getTileEntity(worldIn, pos);

    if (tileentityflowerpot != null && tileentityflowerpot.getFlowerPotItem() != null)
    {
        spawnAsEntity(worldIn, pos, new ItemStack(tileentityflowerpot.getFlowerPotItem(), 1, tileentityflowerpot.getFlowerPotData()));
    }

    super.breakBlock(worldIn, pos, state);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:BlockFlowerPot.java


示例13: onBlockHarvested

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
{
    super.onBlockHarvested(worldIn, pos, state, player);

    if (player.capabilities.isCreativeMode)
    {
        TileEntityFlowerPot tileentityflowerpot = this.getTileEntity(worldIn, pos);

        if (tileentityflowerpot != null)
        {
            tileentityflowerpot.func_190614_a(ItemStack.field_190927_a);
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:BlockFlowerPot.java


示例14: getDrops

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
@Override
public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
{
    java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
    TileEntityFlowerPot te = world.getTileEntity(pos) instanceof TileEntityFlowerPot ? (TileEntityFlowerPot)world.getTileEntity(pos) : null;
    if (te != null && te.getFlowerPotItem() != null)
        ret.add(new ItemStack(te.getFlowerPotItem(), 1, te.getFlowerPotData()));
    return ret;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:10,代码来源:BlockFlowerPot.java


示例15: handleUpdateTileEntity

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
/**
 * Updates the NBTTagCompound metadata of instances of the following entitytypes: Mob spawners, command blocks,
 * beacons, skulls, flowerpot
 */
public void handleUpdateTileEntity(SPacketUpdateTileEntity packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);

    if (this.gameController.theWorld.isBlockLoaded(packetIn.getPos()))
    {
        TileEntity tileentity = this.gameController.theWorld.getTileEntity(packetIn.getPos());
        int i = packetIn.getTileEntityType();
        boolean flag = i == 2 && tileentity instanceof TileEntityCommandBlock;

        if (i == 1 && tileentity instanceof TileEntityMobSpawner || flag || i == 3 && tileentity instanceof TileEntityBeacon || i == 4 && tileentity instanceof TileEntitySkull || i == 5 && tileentity instanceof TileEntityFlowerPot || i == 6 && tileentity instanceof TileEntityBanner || i == 7 && tileentity instanceof TileEntityStructure || i == 8 && tileentity instanceof TileEntityEndGateway || i == 9 && tileentity instanceof TileEntitySign)
        {
            tileentity.readFromNBT(packetIn.getNbtCompound());
        }
        else
        {
            if(tileentity == null)
            {
                LOGGER.error("Received invalid update packet for null tile entity at {} with data: {}", packetIn.getPos(), packetIn.getNbtCompound());
                return;
            }
            tileentity.onDataPacket(netManager, packetIn);
        }

        if (flag && this.gameController.currentScreen instanceof GuiCommandBlock)
        {
            ((GuiCommandBlock)this.gameController.currentScreen).updateGui();
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:35,代码来源:NetHandlerPlayClient.java


示例16: getItem

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public Item getItem(World worldIn, BlockPos pos)
{
	TileEntityFlowerPot tileentityflowerpot = this.getTileEntity(worldIn, pos);
	return tileentityflowerpot != null && tileentityflowerpot.getFlowerPotItem() != null ?
		       tileentityflowerpot.getFlowerPotItem() :
		       Item.getItemFromBlock(MBlocks.ministrapp_flower_pot);
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:10,代码来源:MBlockSketchyBackwaterFlowerpot.java


示例17: getDamageValue

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
@Override
public int getDamageValue(World worldIn, BlockPos pos)
{
	TileEntityFlowerPot tileentityflowerpot = this.getTileEntity(worldIn, pos);
	return tileentityflowerpot != null && tileentityflowerpot.getFlowerPotItem() != null ?
		       tileentityflowerpot.getFlowerPotData() :
		       0;
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:9,代码来源:MBlockSketchyBackwaterFlowerpot.java


示例18: onBlockHarvested

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
@Override
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
{
	super.onBlockHarvested(worldIn, pos, state, player);

	if (player.capabilities.isCreativeMode)
	{
		TileEntityFlowerPot tileentityflowerpot = this.getTileEntity(worldIn, pos);

		if (tileentityflowerpot != null)
		{
			tileentityflowerpot.setFlowerPotData(null, 0);
		}
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:16,代码来源:MBlockSketchyBackwaterFlowerpot.java


示例19: getDrops

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
@Override
public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
{
	java.util.List<ItemStack> ret = super.getDrops(world, pos, state, fortune);
	TileEntityFlowerPot te = world.getTileEntity(pos) instanceof TileEntityFlowerPot ?
		                         (TileEntityFlowerPot) world.getTileEntity(pos) :
		                         null;
	if (te != null && te.getFlowerPotItem() != null)
		ret.add(new ItemStack(te.getFlowerPotItem(), 1, te.getFlowerPotData()));
	return ret;
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:12,代码来源:MBlockSketchyBackwaterFlowerpot.java


示例20: dropBlockAsItemWithChance

import net.minecraft.tileentity.TileEntityFlowerPot; //导入依赖的package包/类
/**
 * Drops the block items with a specified chance of dropping the specified items
 */
public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
{
    super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
    TileEntityFlowerPot var8 = this.func_149929_e(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_);

    if (var8 != null && var8.func_145965_a() != null)
    {
        this.dropBlockAsItem_do(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(var8.func_145965_a(), 1, var8.func_145966_b()));
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:14,代码来源:BlockFlowerPot.java



注:本文中的net.minecraft.tileentity.TileEntityFlowerPot类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EnumDeclaration类代码示例发布时间:2022-05-21
下一篇:
Java EncodingType类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap