net.minecraft.block.Block.eventReceived()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中net.minecraft.block.Block.eventReceived()方法的一些代码示例,展示了Block.eventReceived()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.eventReceived()方法的具体详情如下:
包路径:net.minecraft.block.Block
类名称:Block
方法名:eventReceived

Block.eventReceived介绍

暂无

代码示例

代码示例来源:origin: Vazkii/Botania

@Override
  public boolean eventReceived(IBlockState state, World world, BlockPos pos, int id, int param) {
    super.eventReceived(state, world, pos, id, param);
    TileEntity tileentity = world.getTileEntity(pos);
    return tileentity != null && tileentity.receiveClientEvent(id, param);
  }
}

代码示例来源:origin: DimensionalDevelopment/VanillaFix

@Override
public boolean onBlockEventReceived(World world, BlockPos pos, int id, int param) {
  return block.eventReceived(this, world, pos, id, param);
}

代码示例来源:origin: DimensionalDevelopment/VanillaFix

@Override
public boolean onBlockEventReceived(World worldIn, BlockPos pos, int id, int param) {
  return normalState.getBlock().eventReceived(this, worldIn, pos, id, param);
}

代码示例来源:origin: JurassiCraftTeam/JurassiCraft2

public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int id, int param) {
  super.eventReceived(state, worldIn, pos, id, param);
  TileEntity tileentity = worldIn.getTileEntity(pos);
  return tileentity == null ? false : tileentity.receiveClientEvent(id, param);
}

代码示例来源:origin: TheCBProject/EnderStorage

@Override
public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int eventID, int eventParam) {
  super.eventReceived(state, worldIn, pos, eventID, eventParam);
  TileEntity tileentity = worldIn.getTileEntity(pos);
  return tileentity != null && tileentity.receiveClientEvent(eventID, eventParam);
}

代码示例来源:origin: Darkhax-Minecraft/Bookshelf

@Override
  public boolean eventReceived (IBlockState state, World worldIn, BlockPos pos, int id, int param) {
    
    super.eventReceived(state, worldIn, pos, id, param);
    final TileEntity tileentity = worldIn.getTileEntity(pos);
    return tileentity == null ? false : tileentity.receiveClientEvent(id, param);
  }
}

代码示例来源:origin: OpenMods/OpenModsLib

@SuppressWarnings("deprecation") // TODO review
@Override
public boolean eventReceived(IBlockState state, World world, BlockPos blockPos, int eventId, int eventParam) {
  if (eventId < 0 && !world.isRemote) {
    switch (eventId) {
      case EVENT_ADDED:
        return onBlockAddedNextTick(world, blockPos, state);
    }
    return false;
  }
  if (hasTileEntity) {
    super.eventReceived(state, world, blockPos, eventId, eventParam);
    TileEntity te = world.getTileEntity(blockPos);
    return te != null? te.receiveClientEvent(eventId, eventParam) : false;
  } else {
    return super.eventReceived(state, world, blockPos, eventId, eventParam);
  }
}

相关文章

Block类方法