本文整理汇总了Java中net.minecraft.tileentity.TileEntityBeacon类的典型用法代码示例。如果您正苦于以下问题:Java TileEntityBeacon类的具体用法?Java TileEntityBeacon怎么用?Java TileEntityBeacon使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TileEntityBeacon类属于net.minecraft.tileentity包,在下文中一共展示了TileEntityBeacon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onBlockActivated
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的package包/类
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
if (worldIn.isRemote)
{
return true;
}
else
{
TileEntity tileentity = worldIn.getTileEntity(pos);
if (tileentity instanceof TileEntityBeacon)
{
playerIn.displayGUIChest((TileEntityBeacon)tileentity);
playerIn.triggerAchievement(StatList.field_181730_N);
}
return true;
}
}
示例2: handleUpdateTileEntity
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的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());
}
}
}
示例3: TileEntityRendererDispatcher
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的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);
}
}
示例4: handleUpdateTileEntity
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的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());
}
}
}
示例5: handleUpdateTileEntity
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的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();
}
}
}
示例6: onBlockActivated
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的package包/类
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing heldItem, float side, float hitX, float hitY)
{
if (worldIn.isRemote)
{
return true;
}
else
{
TileEntity tileentity = worldIn.getTileEntity(pos);
if (tileentity instanceof TileEntityBeacon)
{
playerIn.displayGUIChest((TileEntityBeacon)tileentity);
playerIn.addStat(StatList.BEACON_INTERACTION);
}
return true;
}
}
示例7: TileEntityRendererDispatcher
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的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);
}
}
示例8: renderBeacon
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的package包/类
public void renderBeacon(double p_188206_1_, double p_188206_3_, double p_188206_5_, double p_188206_7_, double p_188206_9_, List<TileEntityBeacon.BeamSegment> p_188206_11_, double p_188206_12_)
{
GlStateManager.alphaFunc(516, 0.1F);
this.bindTexture(TEXTURE_BEACON_BEAM);
if (p_188206_9_ > 0.0D)
{
GlStateManager.disableFog();
int i = 0;
for (int j = 0; j < p_188206_11_.size(); ++j)
{
TileEntityBeacon.BeamSegment tileentitybeacon$beamsegment = (TileEntityBeacon.BeamSegment)p_188206_11_.get(j);
renderBeamSegment(p_188206_1_, p_188206_3_, p_188206_5_, p_188206_7_, p_188206_9_, p_188206_12_, i, tileentitybeacon$beamsegment.getHeight(), tileentitybeacon$beamsegment.getColors());
i += tileentitybeacon$beamsegment.getHeight();
}
GlStateManager.enableFog();
}
}
示例9: onBlockActivated
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的package包/类
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
{
if (worldIn.isRemote)
{
return true;
}
else
{
TileEntity tileentity = worldIn.getTileEntity(pos);
if (tileentity instanceof TileEntityBeacon)
{
playerIn.displayGUIChest((TileEntityBeacon)tileentity);
playerIn.addStat(StatList.BEACON_INTERACTION);
}
return true;
}
}
示例10: TileEntityRendererDispatcher
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的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);
}
}
示例11: onReceiveClient
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的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();
}
}
}
}
示例12: onBlockActivated
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的package包/类
/**
* Called upon block activation (right click on the block.)
*/
public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
{
if (p_149727_1_.isClient)
{
return true;
}
else
{
TileEntityBeacon var10 = (TileEntityBeacon)p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_);
if (var10 != null)
{
p_149727_5_.func_146104_a(var10);
}
return true;
}
}
示例13: ContainerBeacon
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的package包/类
public ContainerBeacon(InventoryPlayer par1InventoryPlayer, TileEntityBeacon par2TileEntityBeacon)
{
this.theBeacon = par2TileEntityBeacon;
this.addSlotToContainer(this.beaconSlot = new ContainerBeacon.BeaconSlot(par2TileEntityBeacon, 0, 136, 110));
byte var3 = 36;
short var4 = 137;
int var5;
for (var5 = 0; var5 < 3; ++var5)
{
for (int var6 = 0; var6 < 9; ++var6)
{
this.addSlotToContainer(new Slot(par1InventoryPlayer, var6 + var5 * 9 + 9, var3 + var6 * 18, var4 + var5 * 18));
}
}
for (var5 = 0; var5 < 9; ++var5)
{
this.addSlotToContainer(new Slot(par1InventoryPlayer, var5, var3 + var5 * 18, 58 + var4));
}
this.field_82865_g = par2TileEntityBeacon.func_145998_l();
this.field_82867_h = par2TileEntityBeacon.func_146007_j();
this.field_82868_i = par2TileEntityBeacon.func_146006_k();
}
示例14: TileEntityRendererDispatcher
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的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
示例15: handleUpdateTileEntity
import net.minecraft.tileentity.TileEntityBeacon; //导入依赖的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();
}
}
}