当前位置: 首页>>代码示例>>Java>>正文


Java TileEntitySkull类代码示例

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


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

示例1: updateItemStackNBT

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
/**
 * Called when an ItemStack with NBT data is read to potentially that ItemStack's NBT data
 */
public boolean updateItemStackNBT(NBTTagCompound nbt)
{
    super.updateItemStackNBT(nbt);

    if (nbt.hasKey("SkullOwner", 8) && nbt.getString("SkullOwner").length() > 0)
    {
        GameProfile gameprofile = new GameProfile((UUID)null, nbt.getString("SkullOwner"));
        gameprofile = TileEntitySkull.updateGameprofile(gameprofile);
        nbt.setTag("SkullOwner", NBTUtil.writeGameProfile(new NBTTagCompound(), gameprofile));
        return true;
    }
    else
    {
        return false;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:20,代码来源:ItemSkull.java

示例2: handleUpdateTileEntity

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的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: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());

    for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values())
    {
        tileentityspecialrenderer.setRendererDispatcher(this);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:19,代码来源:TileEntityRendererDispatcher.java

示例4: handleUpdateTileEntity

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的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

示例5: registerBlockRenderers

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
private void registerBlockRenderers() {
	if (EtFuturum.enableSlimeBlock)
		RenderingRegistry.registerBlockHandler(new BlockSlimeBlockRender());

	if (EtFuturum.enableDoors)
		RenderingRegistry.registerBlockHandler(new BlockDoorRenderer());

	if (EtFuturum.enableBanners)
		ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBanner.class, new TileEntityBannerRenderer());

	if (EtFuturum.enableFancySkulls)
		ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySkull.class, new TileEntityFancySkullRenderer());

	if (EtFuturum.enableChorusFruit) {
		RenderingRegistry.registerBlockHandler(new BlockEndRodRender());
		RenderingRegistry.registerBlockHandler(new BlockChorusFlowerRender());
		RenderingRegistry.registerBlockHandler(new BlockChorusPlantRender());
		ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEndRod.class, new TileEntityEndRodRenderer());
	}

	if (EtFuturum.enableColourfulBeacons)
		ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNewBeacon.class, new TileEntityNewBeaconRenderer());

	RenderingRegistry.registerBlockHandler(new BlockChestRenderer());
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:26,代码来源:ClientProxy.java

示例6: handleUpdateTileEntity

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的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

示例7: updateItemStackNBT

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
/**
 * Called when an ItemStack with NBT data is read to potentially that ItemStack's NBT data
 */
public boolean updateItemStackNBT(NBTTagCompound nbt)
{
    super.updateItemStackNBT(nbt);

    if (nbt.hasKey("SkullOwner", 8) && !StringUtils.isBlank(nbt.getString("SkullOwner")))
    {
        GameProfile gameprofile = new GameProfile((UUID)null, nbt.getString("SkullOwner"));
        gameprofile = TileEntitySkull.updateGameprofile(gameprofile);
        nbt.setTag("SkullOwner", NBTUtil.writeGameProfile(new NBTTagCompound(), gameprofile));
        return true;
    }
    else
    {
        return false;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:20,代码来源:ItemSkull.java

示例8: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer());
    this.mapSpecialRenderers.put(TileEntityEndGateway.class, new TileEntityEndGatewayRenderer());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());
    this.mapSpecialRenderers.put(TileEntityStructure.class, new TileEntityStructureRenderer());
    this.mapSpecialRenderers.put(TileEntityShulkerBox.class, new TileEntityShulkerBoxRenderer(new ModelShulker()));

    for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values())
    {
        tileentityspecialrenderer.setRendererDispatcher(this);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:22,代码来源:TileEntityRendererDispatcher.java

示例9: updateItemStackNBT

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
/**
 * Called when an ItemStack with NBT data is read to potentially that ItemStack's NBT data
 */
public boolean updateItemStackNBT(NBTTagCompound nbt)
{
    super.updateItemStackNBT(nbt);

    if (nbt.hasKey("SkullOwner", 8) && !nbt.getString("SkullOwner").isEmpty())
    {
        GameProfile gameprofile = new GameProfile((UUID)null, nbt.getString("SkullOwner"));
        gameprofile = TileEntitySkull.updateGameprofile(gameprofile);
        nbt.setTag("SkullOwner", NBTUtil.writeGameProfile(new NBTTagCompound(), gameprofile));
        return true;
    }
    else
    {
        return false;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:20,代码来源:ItemSkull.java

示例10: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityPistonRenderer());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new TileEntityEnchantmentTableRenderer());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new TileEntityEndPortalRenderer());
    this.mapSpecialRenderers.put(TileEntityEndGateway.class, new TileEntityEndGatewayRenderer());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    this.mapSpecialRenderers.put(TileEntityBanner.class, new TileEntityBannerRenderer());
    this.mapSpecialRenderers.put(TileEntityStructure.class, new TileEntityStructureRenderer());

    for (TileEntitySpecialRenderer<?> tileentityspecialrenderer : this.mapSpecialRenderers.values())
    {
        tileentityspecialrenderer.setRendererDispatcher(this);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:21,代码来源:TileEntityRendererDispatcher.java

示例11: onReceiveClient

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的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

示例12: breakBlock

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
{
    if (!p_149749_1_.isClient)
    {
        if ((p_149749_6_ & 8) == 0)
        {
            ItemStack var7 = new ItemStack(Items.skull, 1, this.getDamageValue(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_));
            TileEntitySkull var8 = (TileEntitySkull)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);

            if (var8.func_145904_a() == 3 && var8.func_145907_c() != null && var8.func_145907_c().length() > 0)
            {
                var7.setTagCompound(new NBTTagCompound());
                var7.getTagCompound().setString("SkullOwner", var8.func_145907_c());
            }

            this.dropBlockAsItem_do(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, var7);
        }

        super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:22,代码来源:BlockSkull.java

示例13: TileEntityRendererDispatcher

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
private TileEntityRendererDispatcher()
{
    this.mapSpecialRenderers.put(TileEntitySign.class, new TileEntitySignRenderer());
    this.mapSpecialRenderers.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
    this.mapSpecialRenderers.put(TileEntityPiston.class, new TileEntityRendererPiston());
    this.mapSpecialRenderers.put(TileEntityChest.class, new TileEntityChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
    this.mapSpecialRenderers.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable());
    this.mapSpecialRenderers.put(TileEntityEndPortal.class, new RenderEndPortal());
    this.mapSpecialRenderers.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
    this.mapSpecialRenderers.put(TileEntitySkull.class, new TileEntitySkullRenderer());
    Iterator var1 = this.mapSpecialRenderers.values().iterator();

    while (var1.hasNext())
    {
        TileEntitySpecialRenderer var2 = (TileEntitySpecialRenderer)var1.next();
        var2.func_147497_a(this);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:20,代码来源:TileEntityRendererDispatcher.java

示例14: getType

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
@ScriptCallable(returnTypes = ReturnType.STRING)
public String getType(TileEntitySkull skull) {
	int skullType = skull.func_145904_a();

	switch (skullType) {
		case 0:
			return "skeleton";
		case 1:
			return "wither_skeleton";
		case 2:
			return "zombie";
		case 3:
			return "player";
		case 4:
			return "creeper";
	}

	return "unknown";
}
 
开发者ID:OpenMods,项目名称:OpenPeripheral-Integration,代码行数:20,代码来源:AdapterSkull.java

示例15: doTheRenderThing

import net.minecraft.tileentity.TileEntitySkull; //导入依赖的package包/类
public void doTheRenderThing(){
    RenderingRegistry.registerEntityRenderingHandler(EntityFrankenstein.class, new RenderFrankenstein());
    RenderingRegistry.registerEntityRenderingHandler(EntityWarhorse.class, new RenderWarhorse());
    RenderingRegistry.registerEntityRenderingHandler(EntityPeep.class, new RenderPeep());
    RenderingRegistry.registerEntityRenderingHandler(EntityUnicorn.class, new RenderUnicorn());
    RenderingRegistry.registerEntityRenderingHandler(EntityCalavera.class, new RenderCalavera());
    RenderingRegistry.registerEntityRenderingHandler(EntityGingerbread.class, new RenderGingerbread());
    RenderingRegistry.registerEntityRenderingHandler(EntityShoggoth.class, new RenderShoggoth());
    RenderingRegistry.registerEntityRenderingHandler(EntityDaySkeleton.class, new RenderSkeleton());
    RenderingRegistry.registerEntityRenderingHandler(EntityDayZombie.class, new RenderZombie());
    RenderingRegistry.registerEntityRenderingHandler(EntityShadowSlime.class, new RenderShadowSlime());
    RenderingRegistry.registerEntityRenderingHandler(EntityCandySheep.class, new RenderCandySheep(new ModelSheep2(), new ModelSheep1(), 0.7F));
    RenderingRegistry.registerEntityRenderingHandler(EntityOldEnderman.class, new RenderOldEnderman());

    if(Config.heads && !Loader.isModLoaded("foxlib")){
        TileEntityRendererDispatcher.instance.mapSpecialRenderers.remove(TileEntitySkull.class);
        BlockSkullRenderer blockSkullRenderer = new BlockSkullRenderer();
        ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySkull.class, blockSkullRenderer);
    }

    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChestRidiculous.class, new RenderTileEntityChest());
    BlockChestRidiculous.render = RenderingRegistry.getNextAvailableRenderId();
    MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RidiculousBlocks.chest), new RenderItemChest());

    ShaderHelper.initShaders();
}
 
开发者ID:SpitefulFox,项目名称:RidiculousWorld,代码行数:27,代码来源:ClientProxy.java


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